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]

an idea to speed up GC


Garbage collection spends a good deal of time scanning over structures
that we know will never be deallocated - the global tree nodes, the
type hash, inline function bodies, etc.  It seems to me we could speed
things up by teaching GC about this.

Suppose we add a second set of mark bits, call it the frozen set.  You
can ask the garbage collector to mark some structure, or all of the
roots, and then copy the mark bits to the frozen bits.  Then, instead
of clearing all the mark bits at the start of a GC run, we copy the
frozen bits to the mark bits.

Does this sound worthwhile?

zw

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