From 21ed264a38862a25964fc02365e1deea5ffcb6c9 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 23 May 2012 12:42:27 -0300 Subject: compensate for 'GCSTEPSIZE' in GC steps --- lapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lapi.c b/lapi.c index 547eeefd..9201aac4 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 2.161 2012/05/21 13:18:10 roberto Exp roberto $ +** $Id: lapi.c,v 2.162 2012/05/22 17:50:39 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -1049,7 +1049,7 @@ LUA_API int lua_gc (lua_State *L, int what, int data) { luaC_forcestep(L); /* do a single step */ } else { - lu_mem debt = cast(lu_mem, data) * 1024; /* count in Kbytes */ + lu_mem debt = cast(lu_mem, data) * 1024 - GCSTEPSIZE; if (g->gcrunning) debt += g->GCdebt; /* include current debt */ luaE_setdebt(g, debt); -- cgit v1.2.3-55-g6feb