summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-10-13 10:07:30 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-10-13 10:07:30 +0000
commita896295770815f5f829fae850b1dcb248343722c (patch)
treeae2ea600f7d95a18bc4fcf4bd11493a3af5a75d7 /regress
parenta3bda8461aa6f21d587a795907b5c9f2c084074c (diff)
Do not attempt to work on more than SHMMAXPGS pages, makes this run unmodified
on vax.
Diffstat (limited to 'regress')
-rw-r--r--regress/sys/uvm/misc/misc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/regress/sys/uvm/misc/misc.c b/regress/sys/uvm/misc/misc.c
index 5a9abe0661e..47fe471413e 100644
--- a/regress/sys/uvm/misc/misc.c
+++ b/regress/sys/uvm/misc/misc.c
@@ -55,6 +55,8 @@
#include <unistd.h>
#include <string.h> /* for memset declaration (?) */
+#include <machine/vmparam.h> /* SHMMAXPGS */
+
int main(int, char *[]);
void usage(void);
@@ -149,6 +151,8 @@ main(argc, argv)
*/
npgs = 128;
+ if (npgs > SHMMAXPGS)
+ npgs = SHMMAXPGS;
printf(">>> MAPPING %d PAGE ANONYMOUS REGION <<<\n", npgs);