diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-12-13 11:55:14 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-12-13 11:55:14 -0300 |
commit | 40565b4a089f44fdcb16f4ed0080b0ca3755e4aa (patch) | |
tree | d3d692070a250e5756fad95388606736253da8c4 /lstate.c | |
parent | ff106c028ca944ee5e95b005628e2669b87bcaf2 (diff) | |
download | lua-40565b4a089f44fdcb16f4ed0080b0ca3755e4aa.tar.gz lua-40565b4a089f44fdcb16f4ed0080b0ca3755e4aa.tar.bz2 lua-40565b4a089f44fdcb16f4ed0080b0ca3755e4aa.zip |
Revamp of GC parameters
More uniformity when handling GC parameters + avoid divisions by 100
when applying them.
Diffstat (limited to 'lstate.c')
-rw-r--r-- | lstate.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -392,11 +392,11 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { | |||
392 | g->marked = 0; | 392 | g->marked = 0; |
393 | g->GCdebt = 0; | 393 | g->GCdebt = 0; |
394 | setivalue(&g->nilvalue, 0); /* to signal that state is not yet built */ | 394 | setivalue(&g->nilvalue, 0); /* to signal that state is not yet built */ |
395 | setgcparam(g->gcpause, LUAI_GCPAUSE); | 395 | setgcparam(g, gcpause, LUAI_GCPAUSE); |
396 | setgcparam(g->gcstepmul, LUAI_GCMUL); | 396 | setgcparam(g, gcstepmul, LUAI_GCMUL); |
397 | g->gcstepsize = LUAI_GCSTEPSIZE; | 397 | g->gcstepsize = LUAI_GCSTEPSIZE; |
398 | setgcparam(g->genmajormul, LUAI_GENMAJORMUL); | 398 | setgcparam(g, genmajormul, LUAI_GENMAJORMUL); |
399 | g->genminormul = LUAI_GENMINORMUL; | 399 | setgcparam(g, genminormul, LUAI_GENMINORMUL); |
400 | for (i=0; i < LUA_NUMTAGS; i++) g->mt[i] = NULL; | 400 | for (i=0; i < LUA_NUMTAGS; i++) g->mt[i] = NULL; |
401 | if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) { | 401 | if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) { |
402 | /* memory allocation error: free partial state */ | 402 | /* memory allocation error: free partial state */ |