[Vm-dev] Why the context become a root

Andreas Raab andreas.raab at gmx.de
Mon Nov 19 23:32:35 UTC 2007


Mathieu Suen wrote:
> Ok so IIRC adding object into the root table that do not contain young 
> object do not bug the system.

Yes.

> but every object that contain young object should be inside this table 
> otherwise the gc crash?

Yes.

> Next question is where do the root table is update to remove the object 
> that dose not contain young one?

It's expensive. For every store into the old object you'd have to check 
whether it is still a root (which is a linear scan over the object 
itself so if it is large it'll be very slow).
> I suppose when a full gc is trigger but is there any other moment?

Yes. When tenuring, the roots table is cleared. A couple of days ago I 
toyed with a variant of the collector which used generation aging (e.g., 
tenures objects after it survived so many GCs) and the main task was 
deciding whether tenuring should make all tenured objects root or if it 
should actually scan them (I think it needs to).

What are you working on?

Cheers,
   - Andreas


More information about the Vm-dev mailing list