X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7410b72db09489e8b9d3ee3cb087f35882397d93..863aeead864a309c494893a1b06ec33ed2b7daf1:/src/xbt/mallocator.c diff --git a/src/xbt/mallocator.c b/src/xbt/mallocator.c index 295ea55dfa..408e115d7c 100644 --- a/src/xbt/mallocator.c +++ b/src/xbt/mallocator.c @@ -71,7 +71,7 @@ void xbt_mallocator_initialization_is_done(int protect) /** used by the module to know if it's time to activate the mallocators yet */ static inline int xbt_mallocator_is_active(void) { -#if HAVE_MALLOCATOR +#if SIMGRID_HAVE_MALLOCATOR return initialization_done && !MC_is_active(); #else return 0; @@ -196,6 +196,8 @@ void *xbt_mallocator_get(xbt_mallocator_t m) */ void xbt_mallocator_release(xbt_mallocator_t m, void *object) { + if (m == NULL) // The mallocators are already destroyed. Bail out ASAP. + return; if (m->objects != NULL) { // Go for it lock_acquire(m); if (m->current_size < m->max_size) {