public static int lua_gc_replace(IntPtr luaState, LuaGCOptions what, int data) { lock (m_Lock) { if (!isHook) { return(lua_gc(luaState, what, data)); } return(0); } }
public static int lua_gc_unhook(IntPtr luaState, LuaGCOptions what, int data) { var tmp = isHook; isHook = false; int ret = lua_gc(luaState, what, data); isHook = tmp; return(ret); }
// steffenj: BEGIN additional Lua API functions new in Lua 5.1 public static int lua_gc(Lua.lua_State luaState, LuaGCOptions what, int data) { return(Lua.lua_gc(luaState, (int)what, data)); }
public static extern int lua_pushthread(IntPtr L); // 0x008447C0-0x008447D0 public static extern int lua_gc(IntPtr luaState, LuaGCOptions what, int data); // 0x00844B50-0x00844B60
public static extern int lua_gc(IntPtr luaState, LuaGCOptions what, int data);
// steffenj: BEGIN additional Lua API functions new in Lua 5.1 public static int lua_gc(Lua.lua_State luaState, LuaGCOptions what, int data) { return Lua.lua_gc(luaState, (int) what, data); }
/// <summary> /// Controls the garbage collector. /// /// This function performs several tasks, according to the value of the parameter what: /// /// LUA_GCSTOP: stops the garbage collector. /// LUA_GCRESTART: restarts the garbage collector. /// LUA_GCCOLLECT: performs a full garbage-collection cycle. /// LUA_GCCOUNT: returns the current amount of memory (in Kbytes) in use by Lua. /// LUA_GCCOUNTB: returns the remainder of dividing the current amount of bytes of memory in use by Lua by 1024. /// LUA_GCSTEP: performs an incremental step of garbage collection.The step "size" is controlled by data(larger values mean more steps) in a non-specified way.If you want to control the step size you must experimentally tune the value of data.The function returns 1 if the step finished a garbage-collection cycle. /// LUA_GCSETPAUSE: sets data as the new value for the pause of the collector(see §2.10). The function returns the previous value of the pause. /// LUA_GCSETSTEPMUL: sets data as the new value for the step multiplier of the collector(see §2.10). The function returns the previous value of the step multiplier. /// </summary> public static void GC(this ILuaState self, LuaGCOptions option, int data) { LuaDLL.lua_gc(self, option, data); }
public static extern int lua_gc(IntPtr L, LuaGCOptions what, int data);
public int LuaGC(LuaGCOptions what, int data = 0) { return(LuaDLL.lua_gc(L, what, data)); }