summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-07-06 03:32:08 +0200
committerRobin Gareus <robin@gareus.org>2016-07-06 03:32:08 +0200
commita2f249d1d7a14498f9b1c0b46f89be4a7e611c37 (patch)
tree9a01592aa4209a9b3694c190d10ba809337fc833 /libs/ardour/session.cc
parentaee63fe5a3cc2b718756d7963c0799cbd7728cea (diff)
tweak lua gc
lua C++ bindings require ~400KB worth of tables now; so bump memory available to rt-safe scripts (full interpreter) to 2MB. Also switch to incremental GC.
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r--libs/ardour/session.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 33d8b08832..677aca249e 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -238,7 +238,7 @@ Session::Session (AudioEngine &eng,
, pending_locate_flush (false)
, pending_abort (false)
, pending_auto_loop (false)
- , _mempool ("Session", 1048576)
+ , _mempool ("Session", 2097152)
, lua (lua_newstate (&PBD::ReallocPool::lalloc, &_mempool))
, _n_lua_scripts (0)
, _butler (new Butler (*this))
@@ -5170,6 +5170,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 (luabridge::LuaException const& e) { }
+ lua.collect_garbage_step ();
}
}
@@ -5179,6 +5180,7 @@ Session::setup_lua ()
#ifndef NDEBUG
lua.Print.connect (&_lua_print);
#endif
+ lua.tweak_rt_gc ();
lua.do_command (
"function ArdourSession ()"
" local self = { scripts = {}, instances = {} }"