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-----
[]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)


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


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 Sealy, PhD                       email :
Software Developer / Architect          phone : +64 3 477 2995
Animation Research Ltd