lua_gc() private method

private lua_gc ( IntPtr luaState, LuaGCOptions what, int data ) : int
luaState System.IntPtr
what LuaGCOptions
data int
return int
示例#1
0
        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);
        }
示例#2
0
        public static void StopGC()
        {
            var env = LuaProfiler.mainL;

            if (env != IntPtr.Zero)
            {
                LuaDLL.lua_gc(env, LuaGCOptions.LUA_GCSTOP, 0);
            }
        }
示例#3
0
        public static void ResumeGC()
        {
            var env = LuaProfiler.mainL;

            if (env != IntPtr.Zero)
            {
                LuaDLL.lua_gc(env, LuaGCOptions.LUA_GCRESTART, 0);
            }
        }
示例#4
0
        public static void RunGC()
        {
            var env = LuaProfiler.mainL;

            if (env != IntPtr.Zero)
            {
                LuaDLL.lua_gc(env, LuaGCOptions.LUA_GCCOLLECT, 0);
            }
        }
示例#5
0
 public int LuaGC(LuaGCOptions what, int data = 0)
 {
     return(LuaDLL.lua_gc(L, what, data));
 }
示例#6
0
 public void LuaGC(LuaGCOptions what, int data = 0)
 {
     LuaDLL.lua_gc(L, what, data);
 }
示例#7
0
 public static int lua_getgccount(IntPtr L)
 {
     return(LuaDLL.lua_gc(L, LuaGCOptions.LUA_GCCOUNT, 0));
 }
示例#8
0
 public void CollectGarbage()
 {
     LuaDLL.lua_gc(luaState, LuaGCOptions.LUA_GCCOLLECT, 0);
 }