summaryrefslogtreecommitdiffstats
path: root/mbbsd/cal.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-15 23:30:58 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-15 23:30:58 +0800
commit066e82d438feb56b585521dece4c03089aa53f0f (patch)
treeb62ad9f6438c450a8a1aecb2e8f4ce3e02c8656b /mbbsd/cal.c
parenta68cfa8e351251df28bca5c4afde981e8614edbb (diff)
downloadpttbbs-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/cal.c')
-rw-r--r--mbbsd/cal.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mbbsd/cal.c b/mbbsd/cal.c
index 71091fac..83e56465 100644
--- a/mbbsd/cal.c
+++ b/mbbsd/cal.c
@@ -1,4 +1,4 @@
-/* $Id: cal.c,v 1.24 2003/03/15 12:33:00 in2 Exp $ */
+/* $Id: cal.c,v 1.25 2003/03/15 15:30:58 in2 Exp $ */
#include "bbs.h"
/* 防堵 Multi play */
@@ -433,7 +433,11 @@ p_sysinfo(void)
#endif
COMPILE_TIME, ctime(&start_time));
if (HAS_PERM(PERM_SYSOP)) {
- prints("記憶體使用量: %d\n", ((int)sbrk(0) - 0x8048000) / 1024);
+ struct rusage ru;
+ getrusage(RUSAGE_SELF, &ru);
+ prints("記憶體用量: sbrk: %d KB, idrss: %d KB, isrss: %d KB\n",
+ ((int)sbrk(0) - 0x8048000) / 1024,
+ (int)ru.ru_idrss, (int)ru.ru_isrss);
#ifdef CRITICAL_MEMORY
prints("目前在 CRITICAL_MEMORY 模式下\n");
#endif