Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add condition before use a mmalloc function.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 14 Jun 2010 14:44:47 +0000 (14:44 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 14 Jun 2010 14:44:47 +0000 (14:44 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7859 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/xbt/xbt_main.c

index 16d5d75..47bef26 100644 (file)
@@ -79,7 +79,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
 #endif
 
 static void xbt_preinit(void) {
-  mmalloc_preinit();
+       #ifdef HAVE_MMAP
+         mmalloc_preinit();
+       #endif
   xbt_log_preinit();
 
   /* Connect our log channels: that must be done manually under windows */
@@ -123,7 +125,9 @@ static void xbt_postexit(void) {
   xbt_log_postexit();
 
   free(xbt_binary_name);
+#ifdef HAVE_MMAP
   mmalloc_postexit();
+#endif
 }
 
 /** @brief Initialize the xbt mechanisms. */