aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-12-27 15:10:11 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-12-27 15:10:11 -0200
commit6a516878e93fb46795aac95087aaf34b17cc4930 (patch)
tree8236a1cf0ea7f766ad6e59ea9110ceb65317c38d
parenta486090a5c287e43581edee373f6fd44e39dd8c7 (diff)
downloadlua-6a516878e93fb46795aac95087aaf34b17cc4930.tar.gz
lua-6a516878e93fb46795aac95087aaf34b17cc4930.tar.bz2
lua-6a516878e93fb46795aac95087aaf34b17cc4930.zip
collectgarbage"count" returns kilobytes (where K = 1024)
-rw-r--r--lbaselib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lbaselib.c b/lbaselib.c
index 1cd2e335..6f495d55 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.185 2005/10/20 11:35:50 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.186 2005/10/21 13:47:42 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -201,7 +201,7 @@ static int luaB_collectgarbage (lua_State *L) {
201 switch (optsnum[o]) { 201 switch (optsnum[o]) {
202 case LUA_GCCOUNT: { 202 case LUA_GCCOUNT: {
203 int b = lua_gc(L, LUA_GCCOUNTB, 0); 203 int b = lua_gc(L, LUA_GCCOUNTB, 0);
204 lua_pushnumber(L, ((lua_Number)res*1024 + b)/1000); 204 lua_pushnumber(L, ((lua_Number)res*1024 + b)/1024);
205 return 1; 205 return 1;
206 } 206 }
207 case LUA_GCSTEP: { 207 case LUA_GCSTEP: {