diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-12-20 16:25:20 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-12-20 16:25:20 -0300 |
commit | ad0ea7813b39e76b377983138ca995189e22054f (patch) | |
tree | 087e3585a4b4bf5ae65f56b9599bbff9c361a123 /lstate.c | |
parent | 666e95a66d1a2ceb98bdf320980b3f655264a9c9 (diff) | |
download | lua-ad0ea7813b39e76b377983138ca995189e22054f.tar.gz lua-ad0ea7813b39e76b377983138ca995189e22054f.tar.bz2 lua-ad0ea7813b39e76b377983138ca995189e22054f.zip |
GC parameters encoded as floating-point bytes
This encoding brings more precision and a larger range for these
parameters.
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, gcpause, LUAI_GCPAUSE); | 368 | setgcparam(g, gcppause, LUAI_GCPAUSE); |
369 | setgcparam(g, gcstepmul, LUAI_GCMUL); | 369 | setgcparam(g, gcpstepmul, LUAI_GCMUL); |
370 | g->gcstepsize = LUAI_GCSTEPSIZE; | 370 | setgcparam(g, gcpstepsize, LUAI_GCSTEPSIZE); |
371 | setgcparam(g, genminormul, LUAI_GENMINORMUL); | 371 | setgcparam(g, gcpgenminormul, LUAI_GENMINORMUL); |
372 | setgcparam(g, minormajor, LUAI_MINORMAJOR); | 372 | setgcparam(g, gcpminormajor, LUAI_MINORMAJOR); |
373 | setgcparam(g, majorminor, LUAI_MAJORMINOR); | 373 | setgcparam(g, gcpmajorminor, 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 */ |