diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-10 13:39:35 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-10 13:39:35 -0200 |
commit | d915cf4f9dbe525f8faeb4cb04df13d5f08692da (patch) | |
tree | b166ca7e66e02999fee1500363c4d301b7e53951 /ltable.c | |
parent | 53fb65d39451f9245d8ed555f941829520ee6f24 (diff) | |
download | lua-d915cf4f9dbe525f8faeb4cb04df13d5f08692da.tar.gz lua-d915cf4f9dbe525f8faeb4cb04df13d5f08692da.tar.bz2 lua-d915cf4f9dbe525f8faeb4cb04df13d5f08692da.zip |
ways to measure number of `blocks' for GC + details
Diffstat (limited to 'ltable.c')
-rw-r--r-- | ltable.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltable.c,v 1.27 1999/10/19 13:33:22 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 1.28 1999/10/26 10:53:40 roberto Exp roberto $ |
3 | ** Lua tables (hash) | 3 | ** Lua tables (hash) |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -26,7 +26,7 @@ | |||
26 | #include "lua.h" | 26 | #include "lua.h" |
27 | 27 | ||
28 | 28 | ||
29 | #define gcsize(n) (1+(n/16)) | 29 | #define gcsize(n) numblocks(n*2, sizeof(Hash)) |
30 | 30 | ||
31 | 31 | ||
32 | 32 | ||
@@ -48,16 +48,16 @@ Node *luaH_mainposition (const Hash *t, const TObject *key) { | |||
48 | h = tsvalue(key)->hash; | 48 | h = tsvalue(key)->hash; |
49 | break; | 49 | break; |
50 | case LUA_T_ARRAY: | 50 | case LUA_T_ARRAY: |
51 | h = (IntPoint)avalue(key); | 51 | h = IntPoint(avalue(key)); |
52 | break; | 52 | break; |
53 | case LUA_T_PROTO: | 53 | case LUA_T_PROTO: |
54 | h = (IntPoint)tfvalue(key); | 54 | h = IntPoint(tfvalue(key)); |
55 | break; | 55 | break; |
56 | case LUA_T_CPROTO: | 56 | case LUA_T_CPROTO: |
57 | h = (IntPoint)fvalue(key); | 57 | h = IntPoint(fvalue(key)); |
58 | break; | 58 | break; |
59 | case LUA_T_CLOSURE: | 59 | case LUA_T_CLOSURE: |
60 | h = (IntPoint)clvalue(key); | 60 | h = IntPoint(clvalue(key)); |
61 | break; | 61 | break; |
62 | default: | 62 | default: |
63 | lua_error("unexpected type to index table"); | 63 | lua_error("unexpected type to index table"); |