/** 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;
*/
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) {