lua-users home
lua-l archive

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

> Is it easy to change the ratio that Lua maintains between the size
> of the heap and the amount of live data at the last collection?

Just change the `2' in

    L->GCthreshold = (limit == 0) ? 2*L->nblocks : L->nblocks+limit;

at lgc.c:265 (Version 3.2).

(`GCthreshold' is the "size of the heap", `nblocks' is "the amount of live 
data". `limit' is always 0 when Lua starts GC.) 

-- Roberto