public static long GetLuaMemory(IntPtr luaState) { long result = 0; result = LuaDLL.lua_gc(luaState, LuaGCOptions.LUA_GCCOUNT, 0); result = result * 1024 + LuaDLL.lua_gc(luaState, LuaGCOptions.LUA_GCCOUNTB, 0); return(result); }
public static void StopGC() { var env = LuaProfiler.mainL; if (env != IntPtr.Zero) { LuaDLL.lua_gc(env, LuaGCOptions.LUA_GCSTOP, 0); } }
public static void ResumeGC() { var env = LuaProfiler.mainL; if (env != IntPtr.Zero) { LuaDLL.lua_gc(env, LuaGCOptions.LUA_GCRESTART, 0); } }
public static void RunGC() { var env = LuaProfiler.mainL; if (env != IntPtr.Zero) { LuaDLL.lua_gc(env, LuaGCOptions.LUA_GCCOLLECT, 0); } }
public int LuaGC(LuaGCOptions what, int data = 0) { return(LuaDLL.lua_gc(L, what, data)); }
public void LuaGC(LuaGCOptions what, int data = 0) { LuaDLL.lua_gc(L, what, data); }
public static int lua_getgccount(IntPtr L) { return(LuaDLL.lua_gc(L, LuaGCOptions.LUA_GCCOUNT, 0)); }
public void CollectGarbage() { LuaDLL.lua_gc(luaState, LuaGCOptions.LUA_GCCOLLECT, 0); }