From 1d10acb35500df47d6052164e6c56476f520232e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 1 Dec 2003 14:33:30 -0200 Subject: incremental GC phases --- lstate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lstate.c') diff --git a/lstate.c b/lstate.c index 459ac2d7..49c71719 100644 --- a/lstate.c +++ b/lstate.c @@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 1.127 2003/10/02 20:31:17 roberto Exp roberto $ +** $Id: lstate.c,v 1.128 2003/11/18 14:55:11 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -112,7 +112,7 @@ static void preinit_state (lua_State *L) { static void close_state (lua_State *L) { global_State *g = G(L); luaF_close(L, L->stack); /* close all upvalues for this thread */ - luaC_sweep(L, 1); /* collect all elements */ + luaC_sweepall(L); /* collect all elements */ lua_assert(g->rootgc == NULL); lua_assert(g->rootudata == NULL); luaS_freeall(L); @@ -165,6 +165,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { setnilvalue(registry(L)); luaZ_initbuffer(L, &g->buff); g->panic = NULL; + g->gcstate = 0; g->rootgc = NULL; g->rootudata = NULL; g->gray = NULL; -- cgit v1.2.3-55-g6feb