tweak lua GC (once again)
authorRobin Gareus <robin@gareus.org>
Thu, 25 Aug 2016 23:18:48 +0000 (01:18 +0200)
committerRobin Gareus <robin@gareus.org>
Thu, 25 Aug 2016 23:18:48 +0000 (01:18 +0200)
fixes OOM with extreme automation in HP/LP.

libs/lua/luastate.cc

index 3b8a7ae25a12de20846f764f35c98d1e80b61cfb..8b704fbe6a58ce6c374958bfdd6a8bdced667ea7 100644 (file)
@@ -83,7 +83,8 @@ LuaState::collect_garbage_step () {
 
 void
 LuaState::tweak_rt_gc () {
-       //lua_gc (L, LUA_GCSETPAUSE, 20);
+       /* GC runs same speed as  memory allocation */
+       lua_gc (L, LUA_GCSETPAUSE, 100);
        lua_gc (L, LUA_GCSETSTEPMUL, 100);
 }