lua-users home
lua-l archive

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


> 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