diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-12-27 15:10:11 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-12-27 15:10:11 -0200 |
commit | 6a516878e93fb46795aac95087aaf34b17cc4930 (patch) | |
tree | 8236a1cf0ea7f766ad6e59ea9110ceb65317c38d | |
parent | a486090a5c287e43581edee373f6fd44e39dd8c7 (diff) | |
download | lua-6a516878e93fb46795aac95087aaf34b17cc4930.tar.gz lua-6a516878e93fb46795aac95087aaf34b17cc4930.tar.bz2 lua-6a516878e93fb46795aac95087aaf34b17cc4930.zip |
collectgarbage"count" returns kilobytes (where K = 1024)
-rw-r--r-- | lbaselib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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: { |