lua-users home
lua-l archive

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


> Another weird thing happens when changing
> 
> -- begin diff to testcase #2 --
> 4c4
> <   while true do  trace '.' ; t = { }  end
> ---
> >   while true do  trace '.' ; local t = { }  end
> -- end diff to testcase #2 --
> 
> (or alternatively saying `local t` in 'body' before entering the loop.)
> 
> Now I get (with and without HARDMEMTESTS, even when adding an additional
> explicit `collectgarbage "collect"` in the loop)
> 
> AB........(forever)
> 
> i.e. the GC doesn't run while Lua merrily allocates gigabytes of memory.

I didn't see any problem here. The __gc does not run because 't' is not
garbage. The GC seems to run, as (at least on my machine) the program
does not allocate gigabytes of memory. (It does seem to allocate very
little memory, in fact.)

-- Roberto