lua-users home
lua-l archive

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

> BTW: I found another problem: luaX_setinput() calls next() which
> in turn may call the reader function which in turn may run the GC.
> But the chunkname string is still unanchored. It's only anchored
> when open_func runs and anchors the prototype in the stack.

The problem may aslo arise if a program stops the collector and then
goes on creating a lot of strings. This is not very smart of the part of
the program, but the price can get very high. Maybe a solution would be
not to stop resizing during a sweepstring phase. (The resize function
could collect itself the dead strings, or it could advance the collector
until it finishes that phase. But I am not sure if this is worth the
extra complexity.)

-- Roberto