[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: GC [was Re: Lua 5.1 (work4) now available]
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 07 Jan 2005 10:45:35 -0200
> I think the problem is that the estimate is derived from the total
> memory consumption after the propagate phase. But it really should be
> derived from the total memory minus the memory (still) occupied by
> soon-to-be-dead objects. See the end of atomic() in lgc.c.
During the sweep phase, the estimate is corrected to subtract dead
objects (see lgc.c:593 and lgc.c:604). So, that shouldn't be a problem.
> Interesting graphs.
Very interesting, indeed.
> From a separation of concerns standpoint, is there an easy way to turn
> off the generational aspect of the collector?
The GC works generational when gcgenerational is true. It is enough to
- g->gcgenerational = g->incgc && (g->estimate/2 <= g->prevestimate);
+ g->gcgenerational = 0;
to keep it off. I agree that it is a good idea to keep it off to
better understand the incremental behavior.
Mike, is it easy to regenerate that graph with the above change?