lua-users home
lua-l archive

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


On 26 June 2014 01:26, Paige DePol <lual@serfnet.org> wrote:
Note that the `g->gcrunning` flag only indicates if the garbage collector is running, not if it is in the middle of a run or any other status other than active or inactive.

Ah ha. So only as long as you haven't called `collectgarbage("stop")` or similar will it not run the emergency collection.
I had assumed 'running' to mean 'sweeping'.

This somewhat makes sense - though why not just run it anyway:
The emergency collector doesn't run finalisers, so no harm can really be done.... unless someone has an alloc function that assumes it will never be called with `nsize=0` when the gc is stopped.