This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: an idea to speed up GC


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]