mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 04:09:29 +01:00
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:
parent
130211a4bd
commit
78cf0e5235
4 changed files with 16 additions and 3 deletions
|
|
@ -162,6 +162,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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue