[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Ever-Increasing Memory Usge in 5.0
- From: roberto@... (Roberto Ierusalimschy)
- Date: Thu, 20 Apr 2006 10:46:30 -0300
> 1) Why is Lua's own GC not able to keep memory down on its own,
> even when its count hits the threshold?
It seems that there is a subtle bug in the GC speed. Do you allocate
other things with each userdata? Specifically, does each userdata has an
own metatable or fenv?
Did you try to change the GC parameters? Specifically, try something
("170" can be anything between 120 and 190; 200 is current default.)
> 4) Why do the first manual calls to GC not free up all the
> memory? Is that really just memory fragmentation? If so, why
> does it take so long to stabilize, and why does it stabilize at
A manual call to GC performs only one cycle. To finalize *and* collect
all userdata you need two GC cycles, so you need to call GC twice.