lua-users home
lua-l archive

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


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
prevestimate.

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.

Mark

on 1/7/05 11:47 AM, Roberto Ierusalimschy at roberto@inf.puc-rio.br 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