-/* Copyright (c) 2010-2015. The SimGrid Team.
+/* Copyright (c) 2010-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
}
/* Override the malloc-like functions if MC is activated at compile time */
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
/* ***** Temporary allocator
*
return mm_fake_malloc(n);
}
-static void* mm_fake_realloc(void *p, size_t s)
+static void* mm_fake_realloc(XBT_ATTRIB_UNUSED void* p, size_t s)
{
return mm_fake_malloc(s);
}
-static void mm_fake_free(void *p)
+static void mm_fake_free(XBT_ATTRIB_UNUSED void* p)
{
+ // Nothing to do
}
/* Function signatures for the main malloc functions: */
/** Constructor functions used to initialize the malloc implementation
*/
-static void __attribute__((constructor(101))) mm_legacy_constructor()
+_XBT_GNUC_CONSTRUCTOR(101) static void mm_legacy_constructor()
{
if (mm_initialized)
return;
mfree(mdp, p);
UNLOCK(mdp);
}
-#endif /* HAVE_MC */
+#endif /* SIMGRID_HAVE_MC */