summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-15 17:41:19 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-15 17:41:19 +0800
commit4ec6b30667d83b998fa9cc1e18e34ee32d96affb (patch)
treeb59a3fc8998c841b30424eac3aafa6ea6f5d4b68
parent7a75ab531004ab812b2e58cce1998482aaad7b7d (diff)
downloadpttbbs-4ec6b30667d83b998fa9cc1e18e34ee32d96affb.tar
pttbbs-4ec6b30667d83b998fa9cc1e18e34ee32d96affb.tar.gz
pttbbs-4ec6b30667d83b998fa9cc1e18e34ee32d96affb.tar.bz2
pttbbs-4ec6b30667d83b998fa9cc1e18e34ee32d96affb.tar.lz
pttbbs-4ec6b30667d83b998fa9cc1e18e34ee32d96affb.tar.xz
pttbbs-4ec6b30667d83b998fa9cc1e18e34ee32d96affb.tar.zst
pttbbs-4ec6b30667d83b998fa9cc1e18e34ee32d96affb.zip
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
-rw-r--r--mbbsd/io.c7
1 files changed, 6 insertions, 1 deletions
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;