Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Those variables must be set here.
[simgrid.git] / src / xbt / xbt_main.c
index 71569a8..8ce310b 100644 (file)
@@ -57,7 +57,7 @@ static void xbt_postexit(void) _XBT_GNUC_DESTRUCTOR;
 #pragma fini (xbt_postexit)
 #endif
 
-#ifdef WIN32
+#ifdef _XBT_WIN32
 #include <windows.h>
 
 /* Dummy prototype to make gcc happy */
@@ -79,6 +79,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
 #endif
 
 static void xbt_preinit(void) {
+       #ifdef HAVE_MMAP
+         mmalloc_preinit();
+       #endif
   xbt_log_preinit();
 
   /* Connect our log channels: that must be done manually under windows */
@@ -106,6 +109,7 @@ static void xbt_preinit(void) {
   XBT_LOG_CONNECT(xbt_sync_os, xbt);
 
   xbt_fifo_preinit();
+  xbt_dict_preinit();
 
   xbt_backtrace_preinit();
   xbt_os_thread_mod_preinit();
@@ -121,6 +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. */