Topic: garbage collection
Author: harrison@sp1.csrd.uiuc.edu (Luddy Harrison)
Date: Sun, 9 May 93 03:27:47 GMT Raw View
grumpy@cbnewse.cb.att.com (Paul J Lucas) writes:
> First, garbage-collection doesn't necessarily do compaction; it
> could just add the free-stuff to a free-list and leave
> everything else where it is.
That's true, but I was responding to several postings pertaining
to the relative performance advantage of garbage collection over
malloc/free storage management. The usual reason that one observes
a performance advantage (as was explained at length in the response
from which I quoted) is that a copying garbage collector need only
touch live data, which is sometimes a small fraction of the memory
allocated. A garbage collection scheme that touches the garbage also
(the free-stuff, as you call it) will presumably not deliver
much better performance than conventional (manual) storage management.
I meant to point out that to apply a copying garbage collection strategy
to C++ is more complicated than to a language like Lisp or Smalltalk.
Luddy Harrison
Center for Supercomputing Research and Development
University of Illinois at Urbana-Champaign
harrison@csrd.uiuc.edu