[gclist] object aging rates in generational collectors
Nick Barnes
Nick.Barnes@pobox.com
Fri, 05 Oct 2001 11:05:30 +0100
One answer to this problem is dynamic arena sizing. There's no reason
for each arena to have a fixed maximum size.
Nick Barnes
Ravenbrook Limited
At 2001-10-05 02:40:05+0000, "Ji-Yong D. Chung" writes:
> This question is assumes that the generational collector
> uses BIBOP table and that arenas are equally partitioned.
>
> The question is: doesn't different aging rates of
> different types of objects cause premature collection of ther
> types of objects?
>
> ====================================
>
> Detailed Description of the question
>
> If one has many arenas in each generation,
> [each arena corresponding to a memory pool for an
> object type], then rates of objects flowing through
> different generations, as they age, will be different
> for different arenas.
>
> So, say you have 2 arenas, 1 for
> pairs, 1 for vectors. If the rate of object creation
> and death is different for pairs and vectors, then
> the rate at which live pairs will flow through the generations
> will be different from the rate at which live vectors
> will move through the generations.
>
> If the rate of flow (aging) is identical for all
> objects, then, when one performs garbage collection,
> all the arenas will be "cleaned up equally."
> If the rate of flow is not the same, the arena through
> which most number of objects move will need GC
> the most. For other arenas, GC maybe premature.
>
> In the worst case scenario, one small arena,
> which keeps accumulating objects, could trigger
> the GC of the whole heap, and thus GC of all
> other arenas which do not need GC.
>
> Is there a solution to this "inefficiency"?
>
> I speculate the solution would require careful sizing
> of arenas to account for different object birth/death
> rates for each arena. Is there a way to determine
> this?
>
>