lua-users home
lua-l archive

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


>
>With the GCCOLLECT the memory stays at 26kiB for the number version and
at 231kiB for the userdata version. Without GCCOLLECT it 
>oscillates at respectively 29-47kiB and 234-253kiB (in sawtooth cycles
with progressive increase and sudden decrease). In any case I >didn't
notice any stall.

Then we are almost there. As you can see in the script, nothing is done
with any of the data. Yet, Lua increases the amount of memory  needed,
proportional to the size of the "cel" array. As you have seen, the
memory increases steadyly until the preprogrammed limit of 150% initial
mem-usage is reached and the GC kicks in. The only question that remains
is, _why_? Why does Lua increase the amount of memory needed? Whats the
logic behind this? A fixed amount of overhead is to be expected for
creating a new thread, but the proportionality with the size of cel
array makes no sense to me.

Max