thead-specific state separated from "global" state

This commit is contained in:
Roberto Ierusalimschy
2001-01-19 11:20:30 -02:00
parent f2c451d745
commit 4ac58853dc
19 changed files with 268 additions and 257 deletions

8
lmem.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lmem.c,v 1.41 2000/12/26 18:46:09 roberto Exp roberto $
** $Id: lmem.c,v 1.42 2000/12/28 12:55:41 roberto Exp roberto $
** Interface to Memory Manager
** See Copyright Notice in lua.h
*/
@@ -161,9 +161,9 @@ void *luaM_realloc (lua_State *L, void *block, luint32 oldsize, luint32 size) {
else return NULL; /* error before creating state! */
}
}
if (L) {
L->nblocks -= oldsize;
L->nblocks += size;
if (L && G(L)) {
G(L)->nblocks -= oldsize;
G(L)->nblocks += size;
}
return block;
}