From: Augustin Degomme Date: Thu, 6 Dec 2012 17:31:11 +0000 (+0100) Subject: mallocators were not initialized and used since commit 1f50f809 X-Git-Tag: v3_9_rc1~86^2~183 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/14608bd75984c1dc3e279f67ccce7a3accb7650a?ds=sidebyside mallocators were not initialized and used since commit 1f50f809 --- diff --git a/src/surf/surf_config.c b/src/surf/surf_config.c index debb767609..df521200d5 100644 --- a/src/surf/surf_config.c +++ b/src/surf/surf_config.c @@ -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"); } diff --git a/src/xbt/mallocator.c b/src/xbt/mallocator.c index e4abe0de7f..d3a7236e01 100644 --- a/src/xbt/mallocator.c +++ b/src/xbt/mallocator.c @@ -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 }