[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 17:47:32 -0200
> 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.