lua-users home
lua-l archive

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

2008/7/4 Roberto Ierusalimschy <>:
> Actually, luaC_step is called from several places through the macro
> luaC_checkGC.

I missed that definition, my use of grep must be improved.

2008/7/4 Makoto Hamanaka <>:
>> > moreover, putting this line after lgc.c:631 removes the freeze:
>> > if (g->totalbytes >= g->GCthreshold) g->GCthreshold = g->totalbytes+1;
>> > and since luaC_step is only used by lua_gc it has little consequences.
>> > But it would seem better to change the setthreshold macro.
> I think it will work on almost all cases.
> Though that change of code will affect the GC behavior, from "GC is
> ready now" to "GC is ready if one byte of memory is newly allocated".

yes, the correct fix is not surprisingly the one by the author, which
is basically what you suggested. :)

One last question: with this change, does a pause of 100 or lower mean
"sweep everything every time the GC is checked"?