[gclist] The old container problem

Hans Boehm boehm@hoh.engr.sgi.com
Mon, 21 Sep 1998 10:10:19 -0700

On Sep 21, 11:26am, David Gadbois wrote:
> Subject: [gclist] The old container problem
> I see a couple of potential solutions:
> 1. Use a sufficiently cheap intergenerational pointer recording method
>    that the write-barrier trap cost is not so high.  E.g., a card
>    marking approach where every write, regardless of whether it is an
>    old-to-new store, is noted.  The downsides are potentially greatly
>    increased write traffic updating the cards and the extra scanning
>    work to be done without precise old-to-new pointer recording.
My impression is that you need to use some flavor of card-marking in any
environment in which frequent writes like this are possible.  It may make sense
to conver the dirty card information to more precise remembered set information
at the first GC, so a card that's dirtied once only has to be scanned once.
 The UMass group, among others, has published some papers on remembered set

A VM-based scheme has the disadvantage that the precision of the remembered set
is usually even worse.  But it has the substantial advantages that it does not
slow down non-allocating code at all, and doesn't get in the way of
hand-optimized code.
> 2. Allocate the containers in a special "pre-natal" area that is
>    younger than the youngest normal generation.  Collect this area by
>    doing a straight non-generational GC at fairly infrequent
>    intervals.  The downsides to this approach are that it requires
>    what amounts to an extra, special-purpose collector and that it
>    complicates already fragile storage system invariants.
It also seems to require programmer intervention, since some other containers
are likely to be short-lived, and containers may be a large fraction of
allocated memory.

Hans-J. Boehm