-/* Allocate SIZE bytes of memory. */
-extern void *mmalloc(void *md, size_t size);
+#include "xbt/dynar.h"
+
+/* Datatype representing a separate heap. The whole point of the mmalloc module
+ * is to allow several such heaps in the process. It thus works by redefining
+ * all the classical memory management functions (malloc and friends) with an
+ * extra first argument: the heap in which the memory is to be taken.
+ *
+ * The heap structure itself is an opaque object that shouldnt be messed with.
+ */
+typedef struct mdesc *xbt_mheap_t;
+
+/* Allocate SIZE bytes of memory (and memset it to 0). */
+XBT_PUBLIC( void ) *mmalloc(xbt_mheap_t md, size_t size);
+
+/* Allocate SIZE bytes of memory (and don't mess with it) */
+void *mmalloc_no_memset(xbt_mheap_t mdp, size_t size);