From 8fbaa58a29a0e6574ed83c3628532489a977fbee Mon Sep 17 00:00:00 2001 From: Dmitrij Tejblum Date: Sun, 21 Jun 1998 18:00:34 +0000 Subject: [PATCH] Make value of SIZE accurate. Obtained from: ps(1) --- usr.bin/top/machine.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index c87b00e0a3cf..dba333b7d34f 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -17,7 +17,7 @@ * Steven Wallace * Wolfram Schneider * - * $Id: machine.c,v 1.9 1998/02/14 13:34:59 peter Exp $ + * $Id: machine.c,v 1.10 1998/05/28 09:29:48 phk Exp $ */ @@ -81,7 +81,7 @@ struct handle ((pct) / (1.0 - exp(PP((pp), p_swtime) * logcpu)))) /* what we consider to be process size: */ -#define PROCSIZE(pp) (VP((pp), vm_tsize) + VP((pp), vm_dsize) + VP((pp), vm_ssize)) +#define PROCSIZE(pp) (VP((pp), vm_map.size) / 1024) /* definitions for indices in the nlist array */ @@ -607,7 +607,7 @@ char *(*get_userid)(); (PP(pp, p_rtprio.type) == RTP_PRIO_REALTIME ? (PRIO_MIN - 1 - RTP_PRIO_MAX + PP(pp, p_rtprio.prio)) : (PRIO_MAX + 1 + PP(pp, p_rtprio.prio)))), - format_k2(pagetok(PROCSIZE(pp))), + format_k2(PROCSIZE(pp)), format_k2(pagetok(VP(pp, vm_rssize))), status, smpmode ? PP(pp, p_lastcpu) : 0,