lua-users home
lua-l archive

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

On 15 August 2018 at 00:55, Hisham <> wrote:
> Is a major collection in the generational GC comparable to a full
> collection as triggered by collectgarbage()? I thought it would be
> more like a regular collection from the incremental GC (with the minor
> collections being faster than those).

in my mental model (plz correct!)  a collection "step" is comparable
in both GC designs, the main difference is when they consider that
they've done enough steps and switch to the next phase.  in the "old"
GC it's when the whole tree has been traversed, while in generational
GC it's when the next objects are "too old", unless this happened to
be a major cycle, then it keeps on as previously.

that still leaves the question: would `collectgarbage('collect')`
always do a major collection, or just a full cycle of whatever size is
currently scheduled?