`free' gets size of the block: complete control over memory use

This commit is contained in:
Roberto Ierusalimschy
2000-12-28 10:55:41 -02:00
parent 8c49e19865
commit 0183b8030c
20 changed files with 207 additions and 224 deletions

3
lapi.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lapi.c,v 1.112 2000/12/04 18:33:40 roberto Exp roberto $
** $Id: lapi.c,v 1.113 2000/12/26 18:46:09 roberto Exp roberto $
** Lua API
** See Copyright Notice in lua.h
*/
@@ -362,7 +362,6 @@ LUA_API int lua_ref (lua_State *L, int lock) {
else { /* no more free places */
luaM_growvector(L, L->refArray, L->nref, L->sizeref, struct Ref,
MAX_INT, "reference table overflow");
L->nblocks += sizeof(struct Ref);
ref = L->nref++;
}
L->refArray[ref].o = *(L->top-1);