Tweak Lua GC
This commit is contained in:
parent
44cf448839
commit
77d16999b5
@ -744,7 +744,7 @@ LuaProc::connect_and_run (BufferSet& bufs,
|
||||
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 ();
|
||||
|
@ -5486,7 +5486,7 @@ Session::try_run_lua (pframes_t nframes)
|
||||
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*/);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
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);
|
||||
|
||||
|
@ -77,8 +77,8 @@ LuaState::collect_garbage () {
|
||||
}
|
||||
|
||||
void
|
||||
LuaState::collect_garbage_step () {
|
||||
lua_gc (L, LUA_GCSTEP, 0);
|
||||
LuaState::collect_garbage_step (int debt) {
|
||||
lua_gc (L, LUA_GCSTEP, debt);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user