aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-03-25 01:57:55 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-03-25 01:57:55 +1300
commita34d04e94e40b091ef4cea378c1e280aa4a07f7f (patch)
treecc0e7e574986ff04206765a39d0624205980aacf
parentAdd files test (diff)
downloaddoomsh-a34d04e94e40b091ef4cea378c1e280aa4a07f7f.tar.gz
doomsh-a34d04e94e40b091ef4cea378c1e280aa4a07f7f.zip
realloc memory in 5mb chunks
-rw-r--r--tests/mem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/mem.c b/tests/mem.c
index 36ad3a9..c144bfc 100644
--- a/tests/mem.c
+++ b/tests/mem.c
@@ -5,8 +5,8 @@
/* mem.c -- Exhaust your memory */
int main(void){
void *ptr = NULL;
- unsigned long mb = 1;
- for (;;mb++) {
+ unsigned long mb = 5;
+ for (;;mb += 5) {
fprintf(stderr, "%lu MB\n", mb);
if ((ptr = realloc(ptr, mb * 1000000)) == NULL) {
raise(SIGABRT);