Re: Promptness of collection

Eliot Moss <[email protected]> Wed, 13 Mar 2013 08:31:23 -0400
Newsgroups gmane.comp.programming.garbage-collection.general
Message-ID <[email protected]>
Some time ago Ole Agesen, David Detlefs, and I studied what
would happen if we added a liveness analysis to Java and
cleared pointers when they became dead. Normally they would
still contain an old value until the end of their scope
(which might or might not be the end of the method call).

Here's the citation and a link:

Ole Agesen, David Detlefs, and J. Eliot B. Moss, ``Garbage Collection and Local
Variable Type-Precision and Liveness in Java Virtual Machines,'' 1998 ACM
SIGPLAN Conference on Programming Language Design and Implementation (PLDI 1998), June
1998, Montreal, Quebec, Canada, pp.~269-279.

http://www.cs.umass.edu/~moss/papers/pldi-1998-liveness.pdf

We found there were cases where it made some difference. Also,
there are subtleties of the language (the JVM spec really) that
make it hard to achieve the best. Specifically, if the last use
of a pointer within a given method is to pass it as an argument
to another method, then we can't clear it out until the method
returns, which extends the reachability of the referent if it dies
during the method call.

Regards -- Eliot