[Gc] A technical question (and maybe a proposal)
hans.boehm at hp.com
Fri Dec 21 15:07:54 PST 2007
> From: Achilleas Margaritis
> I have a question regarding the internals of the gc:
> Are blocks of the same size allocated from the same page? if
> not, then that's my proposal. Allocating same-sized chunks
> from the same page would make locating block headers very
> fast: all that it takes is to divide the page offset by the
> block size to find the block start.
That is essentially what's done, except that there are actually no block headers for in-use blocks, and in some configurations the division is further replaced by a table lookup.
There is a slightly dated description of the GC implementation at https://www.hpl.hp.com/personal/Hans_Boehm/gc/gcdescr.html and https://www.hpl.hp.com/personal/Hans_Boehm/gc/tree.html.
> Gc mailing list
> Gc at linux.hpl.hp.com
More information about the Gc