From 45bd14b392622cb58e967a24e4652c510b3d43e4 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Fri, 12 Jul 2019 05:23:52 -0500 Subject: Lua Add Emergency Garbage Collector Derivative of work by RobertGabrielJakabosky http://lua-users.org/wiki/EmergencyGarbageCollector I've only implemented the not enough memory part and expanded this idea to adding a mechanism to signal the OOM condition of the plugin buffer which allows us to only grab the playback buffer after garbage collection fails (SO THE MUSIC KEEPS PLAYING AS LONG AS POSSIBLE) Change-Id: I684fb98b540ffc01f7ba324ab5b761ceb59b9f9b --- apps/plugins/lua/luaconf.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/plugins/lua/luaconf.h') diff --git a/apps/plugins/lua/luaconf.h b/apps/plugins/lua/luaconf.h index 582968d423..62a3ea0f6b 100644 --- a/apps/plugins/lua/luaconf.h +++ b/apps/plugins/lua/luaconf.h @@ -810,7 +810,13 @@ extern long rb_pow(long, long); /*Rocklua functions*/ #include "rockconf.h" +/* heap */ +#undef LUAI_GCPAUSE /*200*/ +#define LUAI_GCPAUSE 125 +#define MINSTRTABSIZE 512 /*32*/ + /*else*/ +#define LUA_USER_H "lua_user.h" #define LUA_DISABLE_BYTECODE #endif -- cgit v1.2.3