diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-10-13 10:07:30 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-10-13 10:07:30 +0000 |
commit | a896295770815f5f829fae850b1dcb248343722c (patch) | |
tree | ae2ea600f7d95a18bc4fcf4bd11493a3af5a75d7 /regress | |
parent | a3bda8461aa6f21d587a795907b5c9f2c084074c (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.c | 4 |
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); |