[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: bug of GC "step"
- From: "Mauro Iazzi" <mauro.iazzi@...>
- Date: Fri, 4 Jul 2008 12:09:27 +0200
2008/7/4 Roberto Ierusalimschy <firstname.lastname@example.org>:
> Actually, luaC_step is called from several places through the macro
I missed that definition, my use of grep must be improved.
2008/7/4 Makoto Hamanaka <email@example.com>:
>> > 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"?