[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: tuning Lua GC
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 13 Jan 2000 11:38:19 -0200
> 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.)