diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c b/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c index 94f7eb16b5..20dd1a419e 100644 --- a/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c +++ b/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: malloc_ulimit1.c,v 1.3 2017/07/27 15:08:37 bluhm Exp $ */ | 1 | /* $OpenBSD: malloc_ulimit1.c,v 1.4 2018/11/28 13:34:06 bluhm Exp $ */ |
| 2 | 2 | ||
| 3 | /* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */ | 3 | /* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */ |
| 4 | 4 | ||
| @@ -14,13 +14,13 @@ | |||
| 14 | * 2006) where the allocation of the region itself succeeds, but the | 14 | * 2006) where the allocation of the region itself succeeds, but the |
| 15 | * page dir entry pages fails. | 15 | * page dir entry pages fails. |
| 16 | * This in turn trips a "hole in directories" error. | 16 | * This in turn trips a "hole in directories" error. |
| 17 | * Having a large (512M) ulimit -m helps a lot in triggering the | 17 | * Having a large (512M) ulimit -m helps a lot in triggering the |
| 18 | * problem. Note that you may need to run this test multiple times to | 18 | * problem. Note that you may need to run this test multiple times to |
| 19 | * see the error. | 19 | * see the error. |
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | #define STARTI 1300 | 22 | #define STARTI 1300 |
| 23 | #define FACTOR 1024 | 23 | #define FACTOR 1024 |
| 24 | 24 | ||
| 25 | int | 25 | int |
| 26 | main() | 26 | main() |
| @@ -29,6 +29,10 @@ main() | |||
| 29 | size_t sz; | 29 | size_t sz; |
| 30 | int i; | 30 | int i; |
| 31 | void *p; | 31 | void *p; |
| 32 | extern char *malloc_options; | ||
| 33 | |||
| 34 | /* This test takes forever with junking turned on. */ | ||
| 35 | malloc_options = "jj"; | ||
| 32 | 36 | ||
| 33 | if (getrlimit(RLIMIT_DATA, &lim) == -1) | 37 | if (getrlimit(RLIMIT_DATA, &lim) == -1) |
| 34 | err(1, "getrlimit"); | 38 | err(1, "getrlimit"); |
