summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/mptable.h
diff options
context:
space:
mode:
authorluoqi <luoqi@FreeBSD.org>1999-02-19 19:34:49 +0000
committerluoqi <luoqi@FreeBSD.org>1999-02-19 19:34:49 +0000
commitbc93c63b6f8c0958e4477597f14f8897f1c8cec3 (patch)
treed108ab7d8f0fdeccb03c33073e9722969573c189 /sys/i386/include/mptable.h
parente0559c2622dd5910cbc4e00c4cf297fddf071801 (diff)
downloadFreeBSD-src-bc93c63b6f8c0958e4477597f14f8897f1c8cec3.zip
FreeBSD-src-bc93c63b6f8c0958e4477597f14f8897f1c8cec3.tar.gz
Introduce machine-dependent macro pgtok() to convert page count to number
of kilobytes. Its definition for each architecture could be optimized to avoid potential numerical overflows.
Diffstat (limited to 'sys/i386/include/mptable.h')
-rw-r--r--sys/i386/include/mptable.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index e353284..7785052 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.89 1999/01/28 01:59:50 dillon Exp $
+ * $Id: mp_machdep.c,v 1.90 1999/02/19 14:25:32 luoqi Exp $
*/
#include "opt_smp.h"
@@ -2387,10 +2387,10 @@ forwarded_statclock(int id, int pscnt, int *astmap)
if ((pstats = p->p_stats) != NULL &&
(ru = &pstats->p_ru) != NULL &&
(vm = p->p_vmspace) != NULL) {
- ru->ru_ixrss += vm->vm_tsize * PAGE_SIZE / 1024;
- ru->ru_idrss += vm->vm_dsize * PAGE_SIZE / 1024;
- ru->ru_isrss += vm->vm_ssize * PAGE_SIZE / 1024;
- rss = vmspace_resident_count(vm) * PAGE_SIZE / 1024;
+ ru->ru_ixrss += pgtok(vm->vm_tsize);
+ ru->ru_idrss += pgtok(vm->vm_dsize);
+ ru->ru_isrss += pgtok(vm->vm_ssize);
+ rss = pgtok(vmspace_resident_count(vm));
if (ru->ru_maxrss < rss)
ru->ru_maxrss = rss;
}
OpenPOWER on IntegriCloud