Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge remote-tracking branch 'framagit/master'
[simgrid.git] / include / smpi / sampi.h
index b51f8ee5d0c261990fe955e6c493072e6a7fed26..5e011d9d81cf2553a67bff3fe543fcf97664bbd2 100644 (file)
@@ -6,6 +6,7 @@
 #ifndef SAMPI_H_
 #define SAMPI_H_
 
+#define SAMPI_OVERRIDEN_MALLOC
 #include <stdlib.h>
 #include <smpi/smpi.h>
 
@@ -14,6 +15,8 @@
   type _XBT_CONCAT(AP, name) args;
 
 #ifndef HAVE_SMPI
+#undef malloc
+#undef free
 // Internally disable these overrides (HAVE_SMPI is only defined when building the library)
 #define malloc(nbytes) _sampi_malloc(nbytes)
 #define calloc(n_elm, elm_size) _sampi_calloc((n_elm), (elm_size))