Copying GC

Eliot Moss <[email protected]> Thu, 10 Jan 2008 13:19:28 -0500
Newsgroups gmane.comp.programming.garbage-collection.general
Message-ID <[email protected]>
In copying GC one uses breadth-first because the set of copied, but not yet
scanned, objects can themselves form a work queue, making a separate
explicit data structure unnecessary. (This is called "Cheney scan" after
the original author who described it.) Given that GC is usually in a space
crunch, this is quite sensible, though people have explored relaxations to
get obtain copying orders that cluster objects better for cache access,
etc.

As for DFS, it's natural. One should use an explicit stack since it will
use fewer memory words per level (generally 1-2) while the stack frames
used in recursion will tend to be larger. Also, it is easier with an
explicit stack to put in an overflow check (and there are ways to restart),
while overflowing a call stack tends to be fatal.

Hope this helps .... EM
==============================================================================
J. Eliot B. Moss, Professor               http://www.cs.umass.edu/~moss    www
Director, Arch. and Lang. Impl. Lab.      +1-413-545-4206                voice
Department of Computer Science            +1-413-695-4226                 cell
140 Governor's Drive, Room 372            +1-413-545-1249                  fax
University of Massachusetts at Amherst    [email protected]              email
Amherst, MA  01003-9264  USA              +1-413-545-2746 Laurie Downey  sec'y
==============================================================================