This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gc notes available



> > > I think the value is good enough.  Not the modified object needs to be
> > > in the root set, but the object that has a new reference to it.
> > 
> > But each generation has its own pointer of roots to be used when
> > collecting only younger generations.  Which root set does this
> > pointer get listed in?  Suppose I've got three generations:
> > 
> > 0  youngest
> > 1  young
> > 2  old
> > 
> > And suppose the value being stored is a pointer to an object in
> > generation 0.  If the containing object is in generation 1, then I
> > must use the extra root pointer when collecting generation 0, but I
> > can (must?) ignore the extra root pointer when I collect generation
> > 1 or 2.
> 
> I don't think that an old generation is collected without
> simultanously collecting all younger generations, or is it?

That's right... what I meant was this:

A page fault tells us the address at which we tried to store a value,
but we can't follow pointers in reverse to find the object of which
the word being modified is a part.  So we only know the object being
pointed to.

Suppose a page fault tells us that an object Q in generation 0 is being
pointed at from some older generation.  We can't find out if it's
generation 1 or 2.  But, your thesis is that we don't need to know; we
just note that Q now has a new reference to it.

Now, suppose we collect generations 1 and 0.  If the pointer to Q was
from an object in generation 1, then we must not preserve Q; perhaps
the object pointing to it is now free.  If the pointer to Q was in
generation 2, then we must preserve Q, because we are not going to
inspect any of the objects in generation 2.

But all this is moot, because I was totally wrong; you can't easily
find the value being stored on many processors.