Re: Good strategy for determining root set in C++

Eliot Moss <[email protected]> Fri, 14 Apr 2006 07:07:54 -0400
Newsgroups gmane.comp.programming.garbage-collection.general
Message-ID <[email protected]>
Others would be more qualified than I to describe the Boehm collector in
detail. The stack pointer is the obvious clue as to where to start scanning
the stack. In single threaded programs, one would run from there upwards to
the end of the stack region. In multithreaded programs, one must enumerate
the threads and from them their stacks. Static areas come from linker
information to begin with. And the allocation/collection system knows how
it parcels out dynamically allocated memory.

What complicates things a bit is that the collector will avoid using
certain regions of virtual memory precisely because it would cause
non-poiner values in the stack(s)/statics to be considered (ambiguously)
roots.

But if you want to understand that collector, there are papers about its
original design, and I expect you can find experts through this list with
whom you can correspond more directly, etc.

Best wishes -- Eliot Moss