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] |
Marius Vollmer <mvo@zagadka.ping.de> writes: > Jim Blandy <jimb@red-bean.com> writes: > > > > 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. Is there a way to get the value you tried to assign? I've only played around with it enough to get the address, and re-enable writing for the page that faulted. I've not seen anything yet that uses the value that the fault was trying to write. I assumed it was possible, and it probably is, but I'm not entirely sure how you would go about it... maybe looking at the last instruction to see what the value it was trying to store was... it is a bit gross. > > 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. No, you can just check to see where it points, and don't trace any further if you aren't interested in the generation it points to. This is dependent on how roots are found (are they stored separately, or do do you scan for them where they could occur). In the first case, you'd want to take that chance to update the root set; in the second, as long as it isn't now pointing to an own generation object, you can ignore it (if it is, you simply remove it from consideration the next time you do a collection on another generation). > I don't think that an old generation is collected without > simultanously collecting all younger generations, or is it? > Not necessarily. Whether it's a good idea or not is entirely dependent upon the way the application allocates objects. If an old generation is only occupying a segment or two, it's probably best to just tack that on to the collection of a younger generation. If not, you can either keep pointers from young (not youngest) to old, or do a full scan of the younger generations, without doing an actual collection of them (a scan alone is much cheaper). This will be configurable. -- Greg