an idea to speed up GC

Jamie Lokier jamie.lokier@cern.ch
Sat Mar 11 16:25:00 GMT 2000


Mark Mitchell wrote:
>     Zack> Suppose we add a second set of mark bits, call it the frozen
>     Zack> set.  You can ask the garbage collector to mark some
>     Zack> structure, or all of the roots, and then copy the mark bits
>     Zack> to the frozen bits.  Then, instead of clearing all the mark
>     Zack> bits at the start of a GC run, we copy the frozen bits to
>     Zack> the mark bits.
> 
> We thought about something similar.  But, the problem is that some of
> these things might end up pointing to different things: just because
> `a' will always be marked doesn't mean that the things reachable from
> `a' will have already been marked.

However with a frozen set, you don't have to do the mark pass as a
_tree_.  You can just go through each page of frozen objects
consecutively.

It doesn't avoid the scan, but it might make it faster.

-- Jamie


More information about the Gcc mailing list