summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-01-24 18:40:31 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-01-24 18:40:31 +0800
commitf6324fdcb56a70815842cc39cb1826ce6b82148c (patch)
tree2db4fbd3209c2a5daf3e943c7cae53e55b982284 /mbbsd
parent8999cf9ce4f31a052952545a8ca6ad94b355a6b8 (diff)
downloadpttbbs-f6324fdcb56a70815842cc39cb1826ce6b82148c.tar
pttbbs-f6324fdcb56a70815842cc39cb1826ce6b82148c.tar.gz
pttbbs-f6324fdcb56a70815842cc39cb1826ce6b82148c.tar.bz2
pttbbs-f6324fdcb56a70815842cc39cb1826ce6b82148c.tar.lz
pttbbs-f6324fdcb56a70815842cc39cb1826ce6b82148c.tar.xz
pttbbs-f6324fdcb56a70815842cc39cb1826ce6b82148c.tar.zst
pttbbs-f6324fdcb56a70815842cc39cb1826ce6b82148c.zip
define IA32 for IA32 mode
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2425 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/cal.c8
-rw-r--r--mbbsd/xyz.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/mbbsd/cal.c b/mbbsd/cal.c
index d12a1067..08289ef9 100644
--- a/mbbsd/cal.c
+++ b/mbbsd/cal.c
@@ -420,8 +420,14 @@ p_sysinfo(void)
if (HAS_PERM(PERM_SYSOP)) {
struct rusage ru;
getrusage(RUSAGE_SELF, &ru);
- prints("記憶體用量: sbrk: %d KB, idrss: %d KB, isrss: %d KB\n",
+ prints("記憶體用量: "
+#ifdef IA32
+ "sbrk: %d KB, "
+#endif
+ "idrss: %d KB, isrss: %d KB\n",
+#ifdef IA32
((int)sbrk(0) - 0x8048000) / 1024,
+#endif
(int)ru.ru_idrss, (int)ru.ru_isrss);
prints("CPU 用量: %ld.%06ldu %ld.%06lds",
ru.ru_utime.tv_sec, ru.ru_utime.tv_usec,
diff --git a/mbbsd/xyz.c b/mbbsd/xyz.c
index b20b9d74..3cbeee41 100644
--- a/mbbsd/xyz.c
+++ b/mbbsd/xyz.c
@@ -338,12 +338,14 @@ m_sysop()
void
log_memoryusage(void)
{
+#ifdef IA32
int use=((int)sbrk(0)-0x8048000)/1024;
if(use<500)
use=499;
if(use>1000)
use=1000;
GLOBALVAR[use/100-4]++; // use [0]~[6]
+#endif
}
int