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.
This commit is contained in:
@@ -311,6 +311,8 @@ LUA_API int (lua_isyieldable) (lua_State *L);
|
||||
|
||||
LUA_API int (lua_gc) (lua_State *L, int what, int data);
|
||||
|
||||
LUA_API void (lua_mlock) (lua_State *L, int enable);
|
||||
|
||||
|
||||
/*
|
||||
** miscellaneous functions
|
||||
|
||||
Reference in New Issue
Block a user