From 937b1737dad1c93fc903558a19098b403e32314c Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 19 Dec 2017 12:05:01 +0300 Subject: [PATCH] Do not test CHUNK_SIZE allocation if no mmap() available (test_malloc) (fix commit 29d91db) * tests/test_malloc.c (main): Do not call AO_malloc(CHUNK_SIZE) unless HAVE_MMAP. --- tests/test_malloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_malloc.c b/tests/test_malloc.c index c1a7352..f799430 100644 --- a/tests/test_malloc.c +++ b/tests/test_malloc.c @@ -247,7 +247,9 @@ int main(int argc, char **argv) { /* Test various corner cases. */ AO_free(NULL); AO_free(AO_malloc(0)); - AO_free(AO_malloc(CHUNK_SIZE - (sizeof(AO_t)-1))); /* large alloc */ +# ifdef HAVE_MMAP + AO_free(AO_malloc(CHUNK_SIZE - (sizeof(AO_t)-1))); /* large alloc */ +# endif run_parallel(nthreads, run_one_test, dummy_test, "AO_malloc/AO_free"); return 0; -- 2.50.1