[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Back to the GC stall in atomic()
- From: Niklas Frykholm <niklas@...>
- Date: Tue, 11 Dec 2007 18:58:58 +0100
My current plan is to see if the finalizer code in Lua can somehow be
My finalizers can be
called in any order and at any time during garbage collection, before
the userdata object is freed.
I'm thinking (hoping) that with these less strict requirements it would
be possible to get rid of the stall in atomic()
I am not sure this will help. I guess that what causes the stall is
not that the handling of each userdata is complex, but that all those
10,000 userdata must be handled atomically. (The key function here
is 'luaC_separateudata'.) I think the solution would be to do that
separation phase incrementally too, but I don't know how to do it.
Yes, it is luaC_separateudate that stalls. But is that separation phase
really needed if my finalizers "promise" never to create new lua
objects, touch other lua objects, etc.
Couldn't I just call the finalizer in freeobj()?
(My understanding of Lua's garbage collector is still a bit sketchy.)