lua-users home
lua-l archive

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


I don't know about the Lua internals, but for a memory management system I'd
look into something like the frame-based memory system described by Steven
Ranck in Game Programming Gems vol.1 on page 92.  This system lends itself
fairly well to gc and dynamic allocation.

-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br]On Behalf Of George Sealy
Sent: Sunday, March 14, 2004 12:43 PM
To: Lua mailing list
Subject: Re: Lua shared between processes


Hi again,

It looks like if I wan't a Lua state shared between multiple processes,
I'll have to rewrite/replace Lua's memory allocation functions.  Can
anyone confirm for me that all I need to touch are the :

#ifndef l_realloc
#define l_realloc(b,os,s)    realloc(b,s)
#endif

and

#ifndef l_free
#define l_free(b,os)    free(b)
#endif

functions?

Also, can anyone suggest the best way to do this?  Via memory-mapped
files, a huge block allocated at dll initialisation or someother technique?

Thanks for any help,

George

--
George Sealy, PhD                       email : george@arl.co.nz
Software Developer / Architect          phone : +64 3 477 2995
Animation Research Ltd