[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Garbage Collector on Constrained System
- From: Ralph Hempel <rhempel@...>
- Date: Thu, 22 Mar 2007 21:10:02 -0500
I've got a bit of a problem that I hope some gurus can
help me out with.
I'm running 5.1.1 on a very memory constrained system. It's
the LEGO NXT and I have about 52K of RAM allocated to
the heap, which is controlled by malloc()
Once I've loaded the API for the NXT peripherals (C binding to Lua)
the gcinfo() tells me I have about 16K left - which I find hard
to believe. There are about 40 calls to C functions.
What can I tune in the source to force the gc to be more
aggressive, and can it work if I give it a fixed block of
memory that can never be expanded?
Also, can I force the gc to run during script evaluation?
Sometimes if a script is large or complex, the malloc()
I have simply bails and dies saying it can't allocate
any more memory.
Cheers, Ralph