diff options
| author | bluhm <> | 2019-06-12 11:31:36 +0000 |
|---|---|---|
| committer | bluhm <> | 2019-06-12 11:31:36 +0000 |
| commit | 9f9b63f279646fe16eb9a07ade4e1fb8b665eac4 (patch) | |
| tree | 3fc075e555d98a61f3ffc6ce86006963c8d62e6c /src/regress/lib/libc/malloc/malloc_ulimit1 | |
| parent | 7992fd2a4be205fca783974b62f801986019bae4 (diff) | |
| download | openbsd-9f9b63f279646fe16eb9a07ade4e1fb8b665eac4.tar.gz openbsd-9f9b63f279646fe16eb9a07ade4e1fb8b665eac4.tar.bz2 openbsd-9f9b63f279646fe16eb9a07ade4e1fb8b665eac4.zip | |
Set malloc_options in global scope with an initializer.
recommended by otto@
Diffstat (limited to 'src/regress/lib/libc/malloc/malloc_ulimit1')
| -rw-r--r-- | src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c | 9 |
1 files changed, 4 insertions, 5 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 20dd1a419e..799d2b9117 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.4 2018/11/28 13:34:06 bluhm Exp $ */ | 1 | /* $OpenBSD: malloc_ulimit1.c,v 1.5 2019/06/12 11:31:36 bluhm Exp $ */ |
| 2 | 2 | ||
| 3 | /* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */ | 3 | /* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */ |
| 4 | 4 | ||
| @@ -22,6 +22,9 @@ | |||
| 22 | #define STARTI 1300 | 22 | #define STARTI 1300 |
| 23 | #define FACTOR 1024 | 23 | #define FACTOR 1024 |
| 24 | 24 | ||
| 25 | /* This test takes forever with junking turned on. */ | ||
| 26 | char *malloc_options = "jj"; | ||
| 27 | |||
| 25 | int | 28 | int |
| 26 | main() | 29 | main() |
| 27 | { | 30 | { |
| @@ -29,10 +32,6 @@ main() | |||
| 29 | size_t sz; | 32 | size_t sz; |
| 30 | int i; | 33 | int i; |
| 31 | void *p; | 34 | void *p; |
| 32 | extern char *malloc_options; | ||
| 33 | |||
| 34 | /* This test takes forever with junking turned on. */ | ||
| 35 | malloc_options = "jj"; | ||
| 36 | 35 | ||
| 37 | if (getrlimit(RLIMIT_DATA, &lim) == -1) | 36 | if (getrlimit(RLIMIT_DATA, &lim) == -1) |
| 38 | err(1, "getrlimit"); | 37 | err(1, "getrlimit"); |
