lua-users home
lua-l archive

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


On Monday 12, Keith Pimmel wrote:
> So that led me to trying some interprocess gorp, and I stumbled upon
> Boost's interprocess shared memory capabilities. However, the problem I
> have now is that I don't see a way to generate a Lua_state* in a particular
> memory location, so I'm running into that road block now.
You can use a custom memory allocator to control how memory is allocated by 
the Lua core.

use this function to create the lua_State:
lua_newstate(lua_alloc f, void *uc)

Also checkout this post for some allocators you can use to manage the shared 
memory:
http://lua-users.org/lists/lua-l/2008-05/msg00102.html

-- 
Robert G. Jakabosky