[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Question about Lua 5.1.3 and realloc() on life.lua
- From: "Robert G. Jakabosky" <bobby@...>
- Date: Fri, 2 May 2008 13:56:50 -0700
On Friday 02, Bogdan Marinescu wrote:
> think I saw a related thread recently on this list). I find tuning a
> real problem when you're limited to just 64k of RAM and you want to be
> able to execute as much as possible from there.
How do you handle freeing memory when all 64k of RAM is used up? I created a
custom allocator that wraps free/realloc and limits the script to 64K of
allocated ram. Instead of making the GC run faster, I called the GC from the
allocator when the script hit it's 64K limit. But doing so exposed a bug in
the Lua core. See my previous post "PATCH: fixes bug with calling garbage
collector from custom lua_Alloc"
--
Robert G. Jakabosky