lua-users home
lua-l archive

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


I saw your post today, and it's very interesting. Not knowing much
about Lua, I assumed that this (calling the garbage allocator when
there's no more memory) already happens, it seemed so natural :) I'll
integrate your patch and see how/if it changes the minimum memory
requirements for the Lua scripts I'm using as tests. So far, it was
dead easy: when the memory ran out, the script died. Your patch might
give a second chance to programs running out of memory, and it's
clearly something useful on an embedded platform. I'll get back to the
list when I have some results (I need to automate my statistics module
quite a bit to get some 'real' data out of it).

On Fri, May 2, 2008 at 11:56 PM, Robert G. Jakabosky
<bobby@sharedrealm.com> wrote:
> On Friday 02, Bogdan Marinescu wrote:
>  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
>