Fix test_malloc - allocate less memory in case of missing mmap()
authorIvan Maidanski <ivmai@mail.ru>
Wed, 21 Sep 2011 08:50:06 +0000 (12:50 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 21 Sep 2011 08:50:06 +0000 (12:50 +0400)
* tests/test_malloc.c (LIST_LENGTH, LARGE_OBJ_SIZE): Define to
a smaller value unless HAVE_MMAP.

tests/test_malloc.c

index cf9185d..c68b1a4 100644 (file)
 #endif
 
 #ifndef LIST_LENGTH
-# define LIST_LENGTH 1000
+# ifdef HAVE_MMAP
+#   define LIST_LENGTH 1000
+# else
+#   define LIST_LENGTH 100
+# endif
 #endif
 
 #ifndef LARGE_OBJ_SIZE
-# define LARGE_OBJ_SIZE 200000
+# ifdef HAVE_MMAP
+#   define LARGE_OBJ_SIZE 200000
+# else
+#   define LARGE_OBJ_SIZE 20000
+# endif
 #endif
 
 #ifdef USE_STANDARD_MALLOC