[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: tuning Lua GC
- From: Norman Ramsey <nr@...>
- Date: Thu, 13 Jan 2000 10:46:28 -0500
> > 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.)
May I suggest that in a future version, this `2' be a Lua global
variable, or at least settable from Lua code?