diff options
author | Mike Pall <mike> | 2010-10-25 14:53:37 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2010-10-25 14:53:37 +0200 |
commit | ab1b67f73a7ce94fdb91c85727604c714894363b (patch) | |
tree | f39256d351420708cb0e7e92675217cf184a004f /src | |
parent | 08b0ede194ae790775661a6b36a17d3f6cca873f (diff) | |
download | luajit-ab1b67f73a7ce94fdb91c85727604c714894363b.tar.gz luajit-ab1b67f73a7ce94fdb91c85727604c714894363b.tar.bz2 luajit-ab1b67f73a7ce94fdb91c85727604c714894363b.zip |
Fix collectgarbage("count") result if more than 2GB is in use.
Thanks to Tony Finch.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib_base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib_base.c b/src/lib_base.c index 8f63effc..0a13f36b 100644 --- a/src/lib_base.c +++ b/src/lib_base.c | |||
@@ -359,7 +359,7 @@ LJLIB_CF(collectgarbage) | |||
359 | "\4stop\7restart\7collect\5count\1\377\4step\10setpause\12setstepmul"); | 359 | "\4stop\7restart\7collect\5count\1\377\4step\10setpause\12setstepmul"); |
360 | int32_t data = lj_lib_optint(L, 2, 0); | 360 | int32_t data = lj_lib_optint(L, 2, 0); |
361 | if (opt == LUA_GCCOUNT) { | 361 | if (opt == LUA_GCCOUNT) { |
362 | setnumV(L->top, cast_num((int32_t)G(L)->gc.total)/1024.0); | 362 | setnumV(L->top, cast_num(G(L)->gc.total)/1024.0); |
363 | } else { | 363 | } else { |
364 | int res = lua_gc(L, opt, data); | 364 | int res = lua_gc(L, opt, data); |
365 | if (opt == LUA_GCSTEP) | 365 | if (opt == LUA_GCSTEP) |