diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-10-11 09:38:45 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-10-11 09:38:45 -0300 |
commit | 1d8920dd7f508af5f2fd743678be1327f30c079b (patch) | |
tree | 31fdd2aa1c2829904c51be79aa334db020847418 /lstate.c | |
parent | 911f1e3e7ff01dafe3e9f77bc9c8e3a25237d7de (diff) | |
download | lua-1d8920dd7f508af5f2fd743678be1327f30c079b.tar.gz lua-1d8920dd7f508af5f2fd743678be1327f30c079b.tar.bz2 lua-1d8920dd7f508af5f2fd743678be1327f30c079b.zip |
some cleaning in GC parameters
Diffstat (limited to 'lstate.c')
-rw-r--r-- | lstate.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.c,v 2.140 2017/05/26 19:14:29 roberto Exp roberto $ | 2 | ** $Id: lstate.c,v 2.141 2017/06/29 15:06:44 roberto Exp roberto $ |
3 | ** Global State | 3 | ** Global State |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -320,9 +320,11 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { | |||
320 | g->twups = NULL; | 320 | g->twups = NULL; |
321 | g->totalbytes = sizeof(LG); | 321 | g->totalbytes = sizeof(LG); |
322 | g->GCdebt = 0; | 322 | g->GCdebt = 0; |
323 | g->gcpause = LUAI_GCPAUSE; | 323 | setgcparam(g->gcpause, LUAI_GCPAUSE); |
324 | g->gcstepmul = LUAI_GCMUL; | 324 | setgcparam(g->gcstepmul, LUAI_GCMUL); |
325 | g->gcstepsize = LUAI_GCSTEPSIZE; | 325 | g->gcstepsize = LUAI_GCSTEPSIZE; |
326 | setgcparam(g->genmajormul, LUAI_GENMAJORMUL); | ||
327 | g->genminormul = LUAI_GENMINORMUL; | ||
326 | for (i=0; i < LUA_NUMTAGS; i++) g->mt[i] = NULL; | 328 | for (i=0; i < LUA_NUMTAGS; i++) g->mt[i] = NULL; |
327 | if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) { | 329 | if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) { |
328 | /* memory allocation error: free partial state */ | 330 | /* memory allocation error: free partial state */ |