lua-users home
lua-l archive

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


Mauro wrote:
> 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"?

In my understanding, pause value will not affect collectgarbage("step",n),
because that setting is intended for controling the automatic GC
behavior.

About the source side, that g->gcpause is only used on setthreahold()
macro. And setthreshold() macro will be called only on the end of GC
cycle, but with this change, it will just return from collectgarbage("step")
and the new threshold will not be used.

Whereas stepmul value can affect the size of GC work about one call of
collectgarbage("step",n).

  collectgarbage("setstepmul",m)
  collectgarbage("step",n)

It looks like, (n * m) can be a rough indication of the amount of GC
work it will do, but the unit of that value is percent or byte is not
known now ;-)


Thanks,
Makoto Hamanaka <naraxx800@yahoo.co.jp>