cvs commit: src/sys/i386/i386 pmap.c
nate at root.org
Sat Apr 29 17:37:48 UTC 2006
Peter Wemm wrote:
> Stephan realized that the kernel already allocates one PTE per virtual
> page. Although it normally holds physical addresses plus attributes,
> as long as we don't set PG_V, then there are 31 other bits that we
> could use for data storage. We could put virtual addresses in there so
> long as we didn't set PG_V, and abuse that to have a singly linked
> freelist threaded through the PTEs. It turned out even easier though.
> As long as the virtual addresses are page aligned, we neatly avoid all
> the PG_* mode bits as well.
... because you can shift by the page size, saving 12 bits. But are
there any problems with 2 MB pages?
Great ideas, both you and ups at . You know, you can store 2 pointers
there with XOR. ;-)
More information about the cvs-all