From 00c122cc291cfb24e01a5c00f2c3503a6dfa073e Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Mon, 1 Dec 1997 18:30:44 -0200
Subject: other distribution of memory debug information.

---
 lbuiltin.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

(limited to 'lbuiltin.c')

diff --git a/lbuiltin.c b/lbuiltin.c
index 37457d0d..5d6274c3 100644
--- a/lbuiltin.c
+++ b/lbuiltin.c
@@ -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},
-- 
cgit v1.2.3-55-g6feb