lua-users home
lua-l archive

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

Luiz Henrique de Figueiredo wrote:
> >What makes me believe this is a bug is that with lua 5, life.lua dies after
> >about 120 iterations, while it runs fine with lua 4.
> In my Linux box with 128Mb of RAM it runs to completion (2000 iterations).
> Does it give you any kind of message when it dies?

Something's fishy!  I got the problem too (x86-linux libc5).

lua5 -e 's="" for i=1,10000 do s=s.."x" end'

grows to >40MB (100000 is too much for my system) with only 200kb in
actual use (reported by mallinfo).  It seems, the heap is totally
fragmented with realloc unable to reuse anything at all (but nblocks
seems to be right!).

That does _not_ happen with 4.0 (heap grows to 143k with 52k used).

A malloc/free trace looks pretty similar on both version though...

Ciao, ET.

PS: Maybe Lua5 damages some libc datastructures?!? (wild guess)