mirror of
https://github.com/lua/lua.git
synced 2024-11-28 04:33:53 +08:00
bug: generational collection was not running collector! (must write
a test for this...)
This commit is contained in:
parent
2c1a5d678d
commit
e94fac8956
5
lgc.c
5
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 */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user