other distribution of memory debug information.

This commit is contained in:
Roberto Ierusalimschy
1997-12-01 18:30:44 -02:00
parent 03160920cf
commit 00c122cc29
3 changed files with 15 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lbuiltin.c,v 1.12 1997/11/27 18:25:14 roberto Exp roberto $
** $Id: lbuiltin.c,v 1.13 1997/11/28 12:39:45 roberto Exp roberto $
** Built-in functions
** See Copyright Notice in lua.h
*/
@@ -373,6 +373,13 @@ static void luaI_collectgarbage (void)
*/
#ifdef DEBUG
static void mem_query (void)
{
lua_pushnumber(totalmem);
lua_pushnumber(numblocks);
}
static void testC (void)
{
#define getnum(s) ((*s++) - '0')
@@ -433,7 +440,7 @@ static struct luaL_reg int_funcs[] = {
#endif
#ifdef DEBUG
{"testC", testC},
{"totalmem", luaM_query},
{"totalmem", mem_query},
#endif
{"assert", luaI_assert},
{"call", luaI_call},