summaryrefslogtreecommitdiff
path: root/libs/lua/lua-5.3.4/lstate.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-03-19 01:33:13 +0100
committerRobin Gareus <robin@gareus.org>2018-03-19 02:23:09 +0100
commitf2ca0c144b8f74ddf1ed2845de413a8b2e42d832 (patch)
tree727b313cd407357979da9d5544064272e0103dce /libs/lua/lua-5.3.4/lstate.h
parent20929347219355f63cb8e786e5201cd5f352d0af (diff)
Customize Lua GC, add object-memory-lock API.
Add custom API to prevent Lua Objects from being garbage collected. This is intended to for Ardour LuaBridge bindings (~1MB Objects: tables, functions and userdata). The bindings are persistent and the gc can skip them in mark & sweep phases. This is a significant performance improvement for garbage collection. Note. The next version of Lua (5.4) will come with a generational-gc rather than an incremental, so extending the API at this point in time is acceptable.
Diffstat (limited to 'libs/lua/lua-5.3.4/lstate.h')
-rw-r--r--libs/lua/lua-5.3.4/lstate.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/lua/lua-5.3.4/lstate.h b/libs/lua/lua-5.3.4/lstate.h
index a469466c44..a03f9c4c5b 100644
--- a/libs/lua/lua-5.3.4/lstate.h
+++ b/libs/lua/lua-5.3.4/lstate.h
@@ -144,6 +144,7 @@ typedef struct global_State {
unsigned int gcfinnum; /* number of finalizers to call in each GC step */
int gcpause; /* size of pause between successive GCs */
int gcstepmul; /* GC 'granularity' */
+ int gcmlock; /* memory lock new objects - fixedgc */
lua_CFunction panic; /* to be called in unprotected errors */
struct lua_State *mainthread;
const lua_Number *version; /* pointer to version number */