lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 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
change

lgc.c:560: (atomic)

- 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?

-- Roberto