From 1d8920dd7f508af5f2fd743678be1327f30c079b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 11 Oct 2017 09:38:45 -0300 Subject: some cleaning in GC parameters --- lstate.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lstate.c') diff --git a/lstate.c b/lstate.c index b2c3e0c4..626377ae 100644 --- a/lstate.c +++ b/lstate.c @@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 2.140 2017/05/26 19:14:29 roberto Exp roberto $ +** $Id: lstate.c,v 2.141 2017/06/29 15:06:44 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -320,9 +320,11 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { g->twups = NULL; g->totalbytes = sizeof(LG); g->GCdebt = 0; - g->gcpause = LUAI_GCPAUSE; - g->gcstepmul = LUAI_GCMUL; + setgcparam(g->gcpause, LUAI_GCPAUSE); + setgcparam(g->gcstepmul, LUAI_GCMUL); g->gcstepsize = LUAI_GCSTEPSIZE; + setgcparam(g->genmajormul, LUAI_GENMAJORMUL); + g->genminormul = LUAI_GENMINORMUL; for (i=0; i < LUA_NUMTAGS; i++) g->mt[i] = NULL; if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) { /* memory allocation error: free partial state */ -- cgit v1.2.3-55-g6feb