From 4ec6b30667d83b998fa9cc1e18e34ee32d96affb Mon Sep 17 00:00:00 2001 From: in2 Date: Wed, 15 Jan 2003 09:41:19 +0000 Subject: show memory usage by hitting Ctrl-Q in DEBUG mode git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@599 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/io.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mbbsd/io.c b/mbbsd/io.c index aa6e525b..9b34bd12 100644 --- a/mbbsd/io.c +++ b/mbbsd/io.c @@ -1,4 +1,4 @@ -/* $Id: io.c,v 1.25 2002/12/24 08:20:15 in2 Exp $ */ +/* $Id: io.c,v 1.26 2003/01/15 09:41:19 in2 Exp $ */ #include "bbs.h" #if defined(linux) @@ -153,6 +153,11 @@ igetch() register int ch; while ((ch = dogetch())) { switch (ch) { +#ifdef DEBUG + case Ctrl('Q'): + vmsg("memory usage: %d KB", ((int)sbrk(0) - 0x8048000) / 1024); + continue; +#endif case Ctrl('L'): redoscr(); continue; -- cgit v1.2.3