[virtmach] garbage collection
Manoj Plakal
plakal@cs.wisc.edu
Thu, 18 May 2000 11:59:35 -0500
thaddaeus.frogley@creaturelabs.com wrote (Thu, May 18, 2000 at 04:54:47PM +0100) :
> Anyone got any links and / or advice on garbage collection ? :)
Apart from the Jones & Lins book ("Garbage Collection"),
there's Paul Wilson's survey article:
ftp://ftp.cs.utexas.edu/pub/garbage/bigsurv.ps
> I'm thinking, VM (obviously), single threaded environment, indexes into a
> repository containing polymorphic objects act as handles and are stored on
> an untyped stack.
If you want a simple and incremental technique, you
could try reference counting. The VM used in Lucent's
Inferno (it's called Dis) uses reference counting
because it can collect garbage quickly (especially
large expensive objects such as bitmaps) and it's an
incremental technique making it good for real-time and
embedded environments.
The ref counter cannot collect cyclic garbage so you
will probably need to use a tracing collector as
a backup occasionally (or don't bother if you know you
are not going to have too many cycles). And you have
to worry about not putting too much overhead on
common application operations which have to be
instrumented to maintain ref counts. See the
literature for proposed workarounds.
Manoj