From e94fac8956436c246d564ef518b02afa484ac999 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 2 Jun 2010 15:36:58 -0300 Subject: [PATCH] bug: generational collection was not running collector! (must write a test for this...) --- lgc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lgc.c b/lgc.c index 65182650..552164b5 100644 --- a/lgc.c +++ b/lgc.c @@ -1,5 +1,5 @@ /* -** $Id: lgc.c,v 2.95 2010/05/11 20:49:26 roberto Exp roberto $ +** $Id: lgc.c,v 2.96 2010/05/17 20:39:31 roberto Exp roberto $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -932,7 +932,8 @@ static void generationalcollection (lua_State *L) { g->lastmajormem = g->totalbytes; /* update control */ } else { - luaC_runtilstate(L, bitmask(GCSpause)); /* run collection */ + luaC_runtilstate(L, ~bitmask(GCSpause)); /* run complete cycle */ + luaC_runtilstate(L, bitmask(GCSpause)); if (g->totalbytes > g->lastmajormem/100 * g->gcpause) g->lastmajormem = 0; /* signal for a major collection */ }