diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-12-22 14:48:07 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-12-22 14:48:07 -0300 |
commit | e2cc179454c6aa6cde5f98954bd3783e0d5d53a3 (patch) | |
tree | 1770fb2eded15ad53211693b19eb2a8698cbf192 /lstate.c | |
parent | ad0ea7813b39e76b377983138ca995189e22054f (diff) | |
download | lua-e2cc179454c6aa6cde5f98954bd3783e0d5d53a3.tar.gz lua-e2cc179454c6aa6cde5f98954bd3783e0d5d53a3.tar.bz2 lua-e2cc179454c6aa6cde5f98954bd3783e0d5d53a3.zip |
New option "setparms" for 'collectgarbage'
The generational mode also uses the parameters for the incremental
mode in its major collections, so it should be easy to change those
parameters without having to change the GC mode.
Diffstat (limited to 'lstate.c')
-rw-r--r-- | lstate.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -365,12 +365,12 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud, unsigned int seed) { | |||
365 | g->marked = 0; | 365 | g->marked = 0; |
366 | g->GCdebt = 0; | 366 | g->GCdebt = 0; |
367 | setivalue(&g->nilvalue, 0); /* to signal that state is not yet built */ | 367 | setivalue(&g->nilvalue, 0); /* to signal that state is not yet built */ |
368 | setgcparam(g, gcppause, LUAI_GCPAUSE); | 368 | setgcparam(g, PAUSE, LUAI_GCPAUSE); |
369 | setgcparam(g, gcpstepmul, LUAI_GCMUL); | 369 | setgcparam(g, STEPMUL, LUAI_GCMUL); |
370 | setgcparam(g, gcpstepsize, LUAI_GCSTEPSIZE); | 370 | setgcparam(g, STEPSIZE, LUAI_GCSTEPSIZE); |
371 | setgcparam(g, gcpgenminormul, LUAI_GENMINORMUL); | 371 | setgcparam(g, MINORMUL, LUAI_GENMINORMUL); |
372 | setgcparam(g, gcpminormajor, LUAI_MINORMAJOR); | 372 | setgcparam(g, MINORMAJOR, LUAI_MINORMAJOR); |
373 | setgcparam(g, gcpmajorminor, LUAI_MAJORMINOR); | 373 | setgcparam(g, MAJORMINOR, LUAI_MAJORMINOR); |
374 | for (i=0; i < LUA_NUMTAGS; i++) g->mt[i] = NULL; | 374 | for (i=0; i < LUA_NUMTAGS; i++) g->mt[i] = NULL; |
375 | if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) { | 375 | if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) { |
376 | /* memory allocation error: free partial state */ | 376 | /* memory allocation error: free partial state */ |