summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2012-07-10 17:24:46 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2012-07-10 17:24:46 +0000
commit3dc16c06f0e019720a20f0dc7039a84faa6c3ad7 (patch)
treef2cfb00a388a9e3b28722e60fb429120e270e9f7 /bin
parentf637357c09acb96fdce13440bf0f620189ebea4e (diff)
Accounting for page tables, USPACE, and whatever else... as part
of the per-process %mem is not going to happen. In particular, we want USPACE to be removed from param.h
Diffstat (limited to 'bin')
-rw-r--r--bin/ps/print.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c
index 1f0000efb60..61e34227e8d 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.52 2011/12/29 17:13:55 guenther Exp $ */
+/* $OpenBSD: print.c,v 1.53 2012/07/10 17:24:45 deraadt Exp $ */
/* $NetBSD: print.c,v 1.27 1995/09/29 21:58:12 cgd Exp $ */
/*-
@@ -560,17 +560,14 @@ double
getpmem(const struct kinfo_proc *kp)
{
double fracmem;
- int szptudot;
if (mempages == 0)
return (0.0);
if (kp->p_flag & P_SYSTEM)
return (0.0);
- /* XXX want pmap ptpages, segtab, etc. (per architecture) */
- szptudot = USPACE/getpagesize();
/* XXX don't have info about shared */
- fracmem = ((float)kp->p_vm_rssize + szptudot)/mempages;
+ fracmem = ((float)kp->p_vm_rssize)/mempages;
return (100.0 * fracmem);
}