On 6/27/07, Jose Luis Hidalgo <joseluis.hidalgo@gmail.com> wrote:
Hi Fabien,
Just in case, how do you check your leaking problems?
I'm embedding a shell on a small device, and each time I create, close and dereference some userdata encapsulating a communication channel, the amount of memory used by Lua increases. Checked on my custom memory allocator as well as through the gc Lua API. (Of course I make several full GC cycles before checking).
The tool provided by Alexandra through Roberto seems very cool, but it crashes for me due to the limited amount of free RAM I have. By putting breakpoints on the GC, I just saw that the userdata is kept referenced from a thread's stack. I don't know yet which thread, nor how it got this reference, nor if a single thread is responsible for keeping all userdata alive.