Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Bump mmorecore buffer size to 256 bytes on FreeBSD
authorMatthieu Volat <mazhe@alkumuna.eu>
Mon, 7 Nov 2016 13:21:42 +0000 (14:21 +0100)
committerdegomme <augustin.degomme@unibas.ch>
Mon, 7 Nov 2016 13:33:23 +0000 (14:33 +0100)
It seems to need more memory than Linux.

src/xbt/mmalloc/mm_legacy.c

index 790ead6..e8a5c1d 100644 (file)
@@ -58,7 +58,11 @@ xbt_mheap_t mmalloc_set_current_heap(xbt_mheap_t new_heap)
  * This is used before we have found the real malloc implementation with dlsym.
  */
 
  * This is used before we have found the real malloc implementation with dlsym.
  */
 
-#define BUFFER_SIZE 32
+#ifdef __FreeBSD__ /* FreeBSD require more memory, other might */
+# define BUFFER_SIZE 256
+#else /* Valid on: Linux */
+# define BUFFER_SIZE 32
+#endif
 static size_t fake_alloc_index;
 static uint64_t buffer[BUFFER_SIZE];
 
 static size_t fake_alloc_index;
 static uint64_t buffer[BUFFER_SIZE];