Immediate closing of iterators

Christian Plesner Hansen plesner at google.com
Fri Dec 22 01:34:08 PST 2006


What I meant was of course that _conservative_ GC is still possible,
not non-conservative.  D'oh.

On 12/22/06, Chris Hansen <renselp at gmail.com> wrote:
> You're right, non-conservative GC is still possible.
>
> I thought the guarantee was that an unreachable generator will
> eventually be closed.  If you're using a conservative GC you may not
> be able to discover whether or not an object is dead and hence may
> keep dead objects alive indefinitely.  With a generational GC you may
> keep objects alive long after they're dead but at least you can, if
> you want, determine with certainty whether or not an object is dead.
> If you had a policy that caused a full collection to be run of all
> generations with some regularity (and the spec could mandate that) a
> generational GC could offer (what I thought was) the guarantee.
>
> If, on the hand, the guarantee is that a generator will be closed
> before its space is reclaimed then using a conservative GC is still
> fine because the guarantee doesn't deal with generators that are not
> discovered to be garbage.  But then is that a guarantee that is really
> useful to anyone?
>
>
> -- Chris
>
> On 12/22/06, Lars T Hansen <lth at acm.org> wrote:
> > Chris Hansen writes:
> >
> > > Also, having finalization will mandate a non-conservative GC.
> >
> > I assume you're trying to guarantee that the finalizer is run once the
> > object becomes garbage.  But non-conservative generational GCs in general
> > do not make any guarantees about the promptness of collection of any
> > particular object, thus also do not guarantee anything about the running
> > of finalizers.  A generational GC that maintains an set of independently
> > collectable generations and guesses which ones of them are the best to
> > collect may never collect particular generations if it believes those
> > generations contain very little garbage.  A very quick scan of the work by
> > Detlefs et al on "Garbage-first" GC suggests that this collector might
> > behave like that, for example.
> >
> > --lars
> >
> >
>



More information about the Es4-discuss mailing list