lua-users home
lua-l archive

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


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).

  Enrico