lua-users home
lua-l archive

Re: Strange memory behaviour (Lua 5.1)

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


> > LuaState = lua_open();
> > luaL_openlibs(LuaState);
> > lua_setallocf(LuaState, lua_allocate, 0);
> > 
> Try to switch the luaL_openlibs and lua_setallocf statements.
Or simply avoid lua_open:
	LuaState = lua_newstate(lua_allocate, 0);
	luaL_openlibs(LuaState);
Use lua_open only when you're happy with the default allocator provided by
lauxlib.
--lhf

AltStyle によって変換されたページ (->オリジナル) /