diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-03-15 23:30:58 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-03-15 23:30:58 +0800 |
commit | 066e82d438feb56b585521dece4c03089aa53f0f (patch) | |
tree | b62ad9f6438c450a8a1aecb2e8f4ce3e02c8656b /mbbsd/io.c | |
parent | a68cfa8e351251df28bca5c4afde981e8614edbb (diff) | |
download | pttbbs-066e82d438feb56b585521dece4c03089aa53f0f.tar pttbbs-066e82d438feb56b585521dece4c03089aa53f0f.tar.gz pttbbs-066e82d438feb56b585521dece4c03089aa53f0f.tar.bz2 pttbbs-066e82d438feb56b585521dece4c03089aa53f0f.tar.lz pttbbs-066e82d438feb56b585521dece4c03089aa53f0f.tar.xz pttbbs-066e82d438feb56b585521dece4c03089aa53f0f.tar.zst pttbbs-066e82d438feb56b585521dece4c03089aa53f0f.zip |
show sbrk, idrss, isrss
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@698 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/io.c')
-rw-r--r-- | mbbsd/io.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: io.c,v 1.27 2003/01/19 13:24:14 kcwu Exp $ */ +/* $Id: io.c,v 1.28 2003/03/15 15:30:58 in2 Exp $ */ #include "bbs.h" #if defined(linux) @@ -155,8 +155,13 @@ igetch() while ((ch = dogetch())) { switch (ch) { #ifdef DEBUG - case Ctrl('Q'): - vmsg("memory usage: %d KB", ((int)sbrk(0) - 0x8048000) / 1024); + case Ctrl('Q'):{ + struct rusage ru; + getrusage(RUSAGE_SELF, &ru); + vmsg("sbrk: %d KB, idrss: %d KB, isrss: %d KB", + ((int)sbrk(0) - 0x8048000) / 1024, + (int)ru.ru_idrss, (int)ru.ru_isrss); + } continue; #endif case Ctrl('L'): |