aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-12-22 14:48:07 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-12-22 14:48:07 -0300
commite2cc179454c6aa6cde5f98954bd3783e0d5d53a3 (patch)
tree1770fb2eded15ad53211693b19eb2a8698cbf192 /lstate.c
parentad0ea7813b39e76b377983138ca995189e22054f (diff)
downloadlua-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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lstate.c b/lstate.c
index 19505845..de02c91a 100644
--- a/lstate.c
+++ b/lstate.c
@@ -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 */