lua-users home
lua-l archive

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


Roberto wrote:
> Yeah, this is a tricky bug. When we compile a chunk, we add the memory
> used by its code to the threshold, because usually this is not garbage;
> we then avoid useless GC cicles. But in your case, you keep running new
> chunks over and over, and those chunks do not use any extra memory!
> So, the counter nblocks never gets GCthreshold...

I just got burned by this also, by having a small lua_dostring in a main loop that just accesses
a variable or calls a function that uses no memory.

In fact if you want to make your computer very unhappy, run this Lua script:

    while not nil do
        dostring("return nil -- have a nice day!")
    end


-John