[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: GC [was Re: Lua 5.1 (work4) now available]
- From: Mark Hamburg <mhamburg@...>
- Date: Fri, 07 Jan 2005 13:06:21 -0800
I noticed that when I went to try to do a quick hack to try my ideas.
One option that sort of worked was to make the following changes:
1. At the end of luaC_step, when calculating the new threshold, if
g->gcgenerational is 0, then set the threshold to run immediately.
2. Otherwise set the threshold based on estimate and a scaled portion of
The sort of part is that I don't know how close it came to resolving the
issues since I'm not fully configured for benchmarking.
on 1/7/05 11:47 AM, Roberto Ierusalimschy at firstname.lastname@example.org wrote:
>> 1. At the end of a partial collection, if g->totalbytes is greater
>> than twice (or pick the factor of your choice) the value of
>> g->totalbytes at the end of the previous full collection, start an
>> incremental full collection immediately.
> There is a difficulty here. Currently, a "regular" collection starts
> with all objects white. A generational collection, on the other hand,
> starts with all objects black (meaning they are "old"). Lua uses the
> sweep phase to ensure those colors. That is why it must decide whether
> the next collection is generational or not before sweeping.
> -- Roberto