[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Next Version of Lua?
- From: Enrico Colombini <erix@...>
- Date: Sat, 13 Jun 2009 17:29:36 +0200
Ralph Hempel wrote:
The current default garbage collector parameters request a doubling
of the current RAM usage when RAM runs out.
I may be wrong, but I interpret the manual description of 'pause' as
meaning that the collector merely doubles the allocation threshold where
a new collection will forcibly take place. I can't find sbrk() in the code.
Is there a check for failed allocation due to RAM exhaustion?
Anyway, as I said last week, I'm not sure I really understand how this
mechanism works. To avoid the risk of memory overrun in an embedded
system, I ended out checking allocation level periodically with 'count'
and forcing a gc at a fixed threshold, then later checking it again
(suggestions for a better way are welcome).