Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mallocators were not initialized and used since commit 1f50f809
authorAugustin Degomme <degomme@idpann.imag.fr>
Thu, 6 Dec 2012 17:31:11 +0000 (18:31 +0100)
committerAugustin Degomme <degomme@idpann.imag.fr>
Thu, 6 Dec 2012 17:45:43 +0000 (18:45 +0100)
src/surf/surf_config.c
src/xbt/mallocator.c

index debb767..df52120 100644 (file)
@@ -690,6 +690,8 @@ void surf_config_init(int *argc, char **argv)
 
     surf_config_cmd_line(argc, argv);
 
+    xbt_mallocator_initialization_is_done();
+
   } else {
     XBT_WARN("Call to surf_config_init() after initialization ignored");
   }
index e4abe0d..d3a7236 100644 (file)
@@ -54,10 +54,10 @@ void xbt_mallocator_initialization_is_done(void) {
 
 /** used by the module to know if it's time to activate the mallocators yet */
 static XBT_INLINE int xbt_mallocator_is_active(void) {
-#ifndef MALLOCATOR_COMPILED_IN
-  return 0;
-#else
+#if MALLOCATOR_COMPILED_IN
   return initialization_done && !MC_is_active();
+#else
+  return 0;
 #endif
 }