diff options
author | luoqi <luoqi@FreeBSD.org> | 1999-02-19 19:34:49 +0000 |
---|---|---|
committer | luoqi <luoqi@FreeBSD.org> | 1999-02-19 19:34:49 +0000 |
commit | bc93c63b6f8c0958e4477597f14f8897f1c8cec3 (patch) | |
tree | d108ab7d8f0fdeccb03c33073e9722969573c189 /sys/alpha/include/param.h | |
parent | e0559c2622dd5910cbc4e00c4cf297fddf071801 (diff) | |
download | FreeBSD-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/alpha/include/param.h')
-rw-r--r-- | sys/alpha/include/param.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/alpha/include/param.h b/sys/alpha/include/param.h index c07ff73..8bed423 100644 --- a/sys/alpha/include/param.h +++ b/sys/alpha/include/param.h @@ -1,4 +1,4 @@ -/* $Id: param.h,v 1.6 1998/07/30 08:12:14 dfr Exp $ */ +/* $Id: param.h,v 1.7 1998/09/09 01:21:25 jdp Exp $ */ /* From: NetBSD: param.h,v 1.20 1997/09/19 13:52:53 leo Exp */ /* @@ -167,6 +167,8 @@ #define alpha_btop(x) ((unsigned long)(x) >> PAGE_SHIFT) #define alpha_ptob(x) ((unsigned long)(x) << PAGE_SHIFT) +#define pgtok(x) ((x) * (PAGE_SIZE / 1024)) + #ifdef _KERNEL #ifndef _LOCORE |