[Gc] Custom marking infrastructure
laurynas.biveinis at gmail.com
Thu Jul 27 05:38:59 PDT 2006
I'm trying to make use of existing GCC type information infrastructure
to provide exact marking for the collector. But I'm not sure what's
the best way to handle the impendance mismatch between what GCC
provides and collector expects.
If I understand gc_mark.h correctly, I have to register new "kind" of
objects (in this case, all GC-allocated objects would be of this new
kind), free list for it, redirect all allocations to this "kind" and
provide custom marking procedure that works of a mark stack and marks
only a little bit of heap on every invocation.
Now the old GCC mark-and-sweep collectors do not operate on explicit
mark stack – they use program execution stack and use automatically
generated recursive marking routines for that. So the problem is, how
can I make use of those recursive routines for custom marking
procedure that operates on explicit stack? For me the easiest way
would be have a callback that replaces the whole marking phase routine
with my own one (this is experimental code and I don't have to worry
about incremental collection, multi-threaded environment etc.) If
that's impossible, are there any other options?
Thanks in advance and please CC on replies,
More information about the Gc