diff options
author | peter <peter@FreeBSD.org> | 1996-06-29 08:04:05 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-06-29 08:04:05 +0000 |
commit | 70d631930fb9f7651f7a1d011b97ec1e9aa3fb9c (patch) | |
tree | deeff0ff785bd8d89bd1322e1b417f64a65a0437 /bin | |
parent | 9a6bae5c15865c57351b40659c88695aa0fd287d (diff) | |
download | FreeBSD-src-70d631930fb9f7651f7a1d011b97ec1e9aa3fb9c.zip FreeBSD-src-70d631930fb9f7651f7a1d011b97ec1e9aa3fb9c.tar.gz |
Fix (I think) the %MEM count in 'ps -u'. It was bogusly taking the
vm_rssize (in pages, not bytes), then dividing (bogusly) by the page size,
then using that as a fraction of the total pages.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ps/print.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c index ef7425b..f8887ba 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: print.c,v 1.12 1996/05/02 08:37:16 phk Exp $ + * $Id: print.c,v 1.13 1996/05/02 13:06:21 phk Exp $ */ #ifndef lint @@ -575,7 +575,7 @@ getpmem(k) /* XXX want pmap ptpages, segtab, etc. (per architecture) */ szptudot = UPAGES; /* XXX don't have info about shared */ - fracmem = ((float)e->e_vm.vm_rssize + szptudot)/getpagesize()/mempages; + fracmem = ((float)e->e_vm.vm_rssize + szptudot)/mempages; #endif return (100.0 * fracmem); } |