-/* Get core for the memory region specified by MDP, using SIZE as the
- amount to either add to or subtract from the existing region. Works
- like sbrk(), but using mmap().
-
- It never returns NULL. Instead, it dies verbosely on errors. */
-
+/* Return 0if MDP uses anonymous mapping. Otherwise, return off */
+#define MAP_ANON_OR_OFFSET(MDP, off) (((MDP) -> flags & MMALLOC_ANONYMOUS) \
+ ? 0 \
+ : off)
+
+/** @brief Add memory to this heap
+ *
+ * Get core for the memory region specified by MDP, using SIZE as the
+ * amount to either add to or subtract from the existing region. Works
+ * like sbrk(), but using mmap().
+ *
+ * It never returns NULL. Instead, it dies verbosely on errors.
+ *
+ * @param mdp The heap
+ * @param size Bytes to allocate for this heap (or <0 to free memory from this heap)
+ */