lua-users home
lua-l archive

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


Mike Pall wrote:
> Doing a complete GC is
> probably considered 'unfriendly' (and the OOM may hit you
> elsewhere).

The reason I suggested such a harsh solution is that it has
to be more friendly than panicking. :)

I'm tempted to add lazy allocation/deallocation for the C stacks.
The C stack can be deallocated once a thread returns with
L->status != LUA_YIELD (either an error or 0 for completion).
There's no need to wait until the GC deletes the thread object
itself.

That sounds like a nifty approach from where I'm sitting.
It would rely on iterator callers bleeding the iterator dry
rather than abandoning it mid-lifetime to waste away, but
that's *probably* the common case.

--adam