From: Ivan Maidanski Date: Tue, 19 Dec 2017 09:05:01 +0000 (+0300) Subject: Do not test CHUNK_SIZE allocation if no mmap() available (test_malloc) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=937b173;p=libatomic_ops 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. --- 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;