aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-06-02 15:36:58 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-06-02 15:36:58 -0300
commite94fac8956436c246d564ef518b02afa484ac999 (patch)
tree916ae91e631bd7093218323d76bc819614fc53bf
parent2c1a5d678daadec5de189c58a5fef7e12d463b71 (diff)
downloadlua-e94fac8956436c246d564ef518b02afa484ac999.tar.gz
lua-e94fac8956436c246d564ef518b02afa484ac999.tar.bz2
lua-e94fac8956436c246d564ef518b02afa484ac999.zip
bug: generational collection was not running collector! (must write
a test for this...)
-rw-r--r--lgc.c5
1 files 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 @@
1/* 1/*
2** $Id: lgc.c,v 2.95 2010/05/11 20:49:26 roberto Exp roberto $ 2** $Id: lgc.c,v 2.96 2010/05/17 20:39:31 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -932,7 +932,8 @@ static void generationalcollection (lua_State *L) {
932 g->lastmajormem = g->totalbytes; /* update control */ 932 g->lastmajormem = g->totalbytes; /* update control */
933 } 933 }
934 else { 934 else {
935 luaC_runtilstate(L, bitmask(GCSpause)); /* run collection */ 935 luaC_runtilstate(L, ~bitmask(GCSpause)); /* run complete cycle */
936 luaC_runtilstate(L, bitmask(GCSpause));
936 if (g->totalbytes > g->lastmajormem/100 * g->gcpause) 937 if (g->totalbytes > g->lastmajormem/100 * g->gcpause)
937 g->lastmajormem = 0; /* signal for a major collection */ 938 g->lastmajormem = 0; /* signal for a major collection */
938 } 939 }