commit f41fc0eb0e7e92d04c9df206b8f185792804bf6a
parent d872090248f7c90ce8d19af4eda3c0a6727f1261
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Fri, 18 Mar 2005 17:11:06 -0300
small bug: a GC step was not proportional to its "size"
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lapi.c b/lapi.c
@@ -1,5 +1,5 @@
/*
-** $Id: lapi.c,v 2.32 2005/03/16 16:58:41 roberto Exp roberto $
+** $Id: lapi.c,v 2.33 2005/03/18 18:55:45 roberto Exp roberto $
** Lua API
** See Copyright Notice in lua.h
*/
@@ -907,7 +907,8 @@ LUA_API int lua_gc (lua_State *L, int what, int data) {
g->GCthreshold = g->totalbytes - a;
else
g->GCthreshold = 0;
- luaC_step(L);
+ while (g->GCthreshold <= g->totalbytes)
+ luaC_step(L);
break;
}
case LUA_GCSETPACE: {