diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-09-29 09:42:13 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-09-29 09:42:13 -0300 |
commit | dad808a73a98a23729614b8814728d76b4e5d577 (patch) | |
tree | 945fabce1906c5f08fe6512476d7ca3d84017bca /lapi.c | |
parent | ca7fd50a4ec2f1b41292f859ba0d5e52a2b22a5c (diff) | |
download | lua-dad808a73a98a23729614b8814728d76b4e5d577.tar.gz lua-dad808a73a98a23729614b8814728d76b4e5d577.tar.bz2 lua-dad808a73a98a23729614b8814728d76b4e5d577.zip |
new way to count `nblocks' for GC (try to count bytes).
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.99 2000/09/18 19:39:26 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.100 2000/09/27 12:51:39 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -355,6 +355,7 @@ int lua_ref (lua_State *L, int lock) { | |||
355 | else { /* no more free places */ | 355 | else { /* no more free places */ |
356 | luaM_growvector(L, L->refArray, L->refSize, 1, struct Ref, | 356 | luaM_growvector(L, L->refArray, L->refSize, 1, struct Ref, |
357 | "reference table overflow", MAX_INT); | 357 | "reference table overflow", MAX_INT); |
358 | L->nblocks += sizeof(struct Ref); | ||
358 | ref = L->refSize++; | 359 | ref = L->refSize++; |
359 | } | 360 | } |
360 | L->refArray[ref].o = *(L->top-1); | 361 | L->refArray[ref].o = *(L->top-1); |