int64_t t1 = g_get_monotonic_time ();
#endif
- lua.collect_garbage_step ();
+ lua.collect_garbage_step (100 /*kB*/);
#ifdef WITH_LUAPROC_STATS
++_stats_cnt;
int64_t t2 = g_get_monotonic_time ();
Glib::Threads::Mutex::Lock tm (lua_lock, Glib::Threads::TRY_LOCK);
if (tm.locked ()) {
try { (*_lua_run)(nframes); } catch (...) { }
- lua.collect_garbage_step ();
+ lua.collect_garbage_step (100 /*kB*/);
}
}
int do_command (std::string);
int do_file (std::string);
void collect_garbage ();
- void collect_garbage_step ();
+ void collect_garbage_step (int debt = 0);
void tweak_rt_gc ();
void sandbox (bool rt_safe = false);
}
void
-LuaState::collect_garbage_step () {
- lua_gc (L, LUA_GCSTEP, 0);
+LuaState::collect_garbage_step (int debt) {
+ lua_gc (L, LUA_GCSTEP, debt);
}
void