lua-users home
lua-l archive

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


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