summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-09-21 12:50:06 +0400
committerIvan Maidanski <ivmai@mail.ru>2011-09-21 13:44:12 +0400
commite14f968187fd70901d37c09a2417127f727fffcb (patch)
treecd414d9e59a9ff2e1d1f06030f60846a4e044868
parent7296c4f7fa93b73777ed8d1d3d9f486353a2ba3a (diff)
downloadlibatomic_ops-e14f968187fd70901d37c09a2417127f727fffcb.tar.gz
Fix test_malloc - allocate less memory in case of missing mmap()
* tests/test_malloc.c (LIST_LENGTH, LARGE_OBJ_SIZE): Define to a smaller value unless HAVE_MMAP.
-rw-r--r--tests/test_malloc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/test_malloc.c b/tests/test_malloc.c
index b1f6eb2..a1f4179 100644
--- a/tests/test_malloc.c
+++ b/tests/test_malloc.c
@@ -39,11 +39,19 @@
#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