diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-12-28 10:55:41 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-12-28 10:55:41 -0200 |
commit | 0183b8030c80f57b87874ff7867ccdb172d9d3dc (patch) | |
tree | 1033b5a84489a2f1f1bd210b1b120155cd7aeed7 /lapi.c | |
parent | 8c49e198654567f770a7d5081b886a7c35201d81 (diff) | |
download | lua-0183b8030c80f57b87874ff7867ccdb172d9d3dc.tar.gz lua-0183b8030c80f57b87874ff7867ccdb172d9d3dc.tar.bz2 lua-0183b8030c80f57b87874ff7867ccdb172d9d3dc.zip |
`free' gets size of the block: complete control over memory use
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.112 2000/12/04 18:33:40 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.113 2000/12/26 18:46:09 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 | */ |
@@ -362,7 +362,6 @@ LUA_API int lua_ref (lua_State *L, int lock) { | |||
362 | else { /* no more free places */ | 362 | else { /* no more free places */ |
363 | luaM_growvector(L, L->refArray, L->nref, L->sizeref, struct Ref, | 363 | luaM_growvector(L, L->refArray, L->nref, L->sizeref, struct Ref, |
364 | MAX_INT, "reference table overflow"); | 364 | MAX_INT, "reference table overflow"); |
365 | L->nblocks += sizeof(struct Ref); | ||
366 | ref = L->nref++; | 365 | ref = L->nref++; |
367 | } | 366 | } |
368 | L->refArray[ref].o = *(L->top-1); | 367 | L->refArray[ref].o = *(L->top-1); |