From 52ae93e65690ae1ec52c385af36fcc44e4329080 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sat, 13 Feb 2010 02:02:16 -0800 Subject: [PATCH] test utilities - eatmem.c - Change size parameter from int to size_t * Allows large multi-gigabyte allocations on 64-bit boxes --- test/stress/eatmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/stress/eatmem.c b/test/stress/eatmem.c index c837a2920d..043c133616 100644 --- a/test/stress/eatmem.c +++ b/test/stress/eatmem.c @@ -18,8 +18,8 @@ int main(int ac, char **av) { - int bytes; - int i; + size_t bytes; + size_t i; char *ptr; if (ac == 1) { @@ -27,7 +27,7 @@ main(int ac, char **av) printf("specifying msec/page will cause eatmem to loop forever\n"); exit(1); } - bytes = strtol(av[1], NULL, 0) * 1024 * 1024; + bytes = strtoul(av[1], NULL, 0) * 1024 * 1024; ptr = malloc(bytes); for (;;) { -- 2.41.0