diff options
Diffstat (limited to 'libbb/procps.c')
-rw-r--r-- | libbb/procps.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libbb/procps.c b/libbb/procps.c index 44103fa..252e9c7 100644 --- a/libbb/procps.c +++ b/libbb/procps.c @@ -115,7 +115,11 @@ extern procps_status_t * procps_scan(int save_user_arg0 else curstatus.state[2] = ' '; +#ifdef PAGE_SHIFT curstatus.rss <<= (PAGE_SHIFT - 10); /* 2**10 = 1kb */ +#else + curstatus.rss *= (getpagesize() >> 10); /* 2**10 = 1kb */ +#endif if(save_user_arg0) { sprintf(status, "/proc/%d/cmdline", pid); |