diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-03-18 17:11:28 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-03-18 17:11:28 -0300 |
commit | f41fc0eb0e7e92d04c9df206b8f185792804bf6a (patch) | |
tree | d5531e6d5b6c056d647bdd5c9bb3f4f672d75990 /lapi.c | |
parent | d872090248f7c90ce8d19af4eda3c0a6727f1261 (diff) | |
download | lua-f41fc0eb0e7e92d04c9df206b8f185792804bf6a.tar.gz lua-f41fc0eb0e7e92d04c9df206b8f185792804bf6a.tar.bz2 lua-f41fc0eb0e7e92d04c9df206b8f185792804bf6a.zip |
small bug: a GC step was not proportional to its "size"
Diffstat (limited to '')
-rw-r--r-- | lapi.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.32 2005/03/16 16:58:41 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.33 2005/03/18 18:55:45 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -907,7 +907,8 @@ LUA_API int lua_gc (lua_State *L, int what, int data) { | |||
907 | g->GCthreshold = g->totalbytes - a; | 907 | g->GCthreshold = g->totalbytes - a; |
908 | else | 908 | else |
909 | g->GCthreshold = 0; | 909 | g->GCthreshold = 0; |
910 | luaC_step(L); | 910 | while (g->GCthreshold <= g->totalbytes) |
911 | luaC_step(L); | ||
911 | break; | 912 | break; |
912 | } | 913 | } |
913 | case LUA_GCSETPACE: { | 914 | case LUA_GCSETPACE: { |