details
This commit is contained in:
6
lmem.h
6
lmem.h
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lmem.h,v 1.10 1999/11/22 13:12:07 roberto Exp roberto $
|
** $Id: lmem.h,v 1.11 1999/12/27 17:33:22 roberto Exp roberto $
|
||||||
** Interface to Memory Manager
|
** Interface to Memory Manager
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -34,8 +34,8 @@ void *luaM_growaux (lua_State *L, void *block, unsigned long nelems, int inc, in
|
|||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
extern unsigned long numblocks;
|
extern unsigned long memdebug_numblocks;
|
||||||
extern unsigned long totalmem;
|
extern unsigned long memdebug_total;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
6
lstate.c
6
lstate.c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lstate.c,v 1.22 1999/12/07 11:42:54 roberto Exp roberto $
|
** $Id: lstate.c,v 1.23 1999/12/21 18:04:41 roberto Exp roberto $
|
||||||
** Global State
|
** Global State
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -105,8 +105,8 @@ void lua_close (lua_State *L) {
|
|||||||
LUA_ASSERT(L, L->Cstack.base == L->top, "C2Lua not empty");
|
LUA_ASSERT(L, L->Cstack.base == L->top, "C2Lua not empty");
|
||||||
luaM_free(L, L);
|
luaM_free(L, L);
|
||||||
if (L == lua_state) {
|
if (L == lua_state) {
|
||||||
LUA_ASSERT(L, numblocks == 0, "memory leak!");
|
LUA_ASSERT(L, memdebug_numblocks == 0, "memory leak!");
|
||||||
LUA_ASSERT(L, totalmem == 0,"memory leak!");
|
LUA_ASSERT(L, memdebug_total == 0,"memory leak!");
|
||||||
lua_state = NULL;
|
lua_state = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
6
ltests.c
6
ltests.c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ltests.c,v 1.2 1999/12/23 18:19:57 roberto Exp roberto $
|
** $Id: ltests.c,v 1.3 1999/12/27 17:33:22 roberto Exp roberto $
|
||||||
** Internal Module for Debugging of the Lua Implementation
|
** Internal Module for Debugging of the Lua Implementation
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -30,8 +30,8 @@ void luaB_opentests (lua_State *L);
|
|||||||
|
|
||||||
|
|
||||||
static void mem_query (lua_State *L) {
|
static void mem_query (lua_State *L) {
|
||||||
lua_pushnumber(L, totalmem);
|
lua_pushnumber(L, memdebug_total);
|
||||||
lua_pushnumber(L, numblocks);
|
lua_pushnumber(L, memdebug_numblocks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user