From 14608bd75984c1dc3e279f67ccce7a3accb7650a Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Thu, 6 Dec 2012 18:31:11 +0100 Subject: [PATCH] mallocators were not initialized and used since commit 1f50f809 --- src/surf/surf_config.c | 2 ++ src/xbt/mallocator.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) 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 } -- 2.20.1