summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mapalloc.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/mapalloc.h b/include/mapalloc.h
index f4a4434..65581c8 100644
--- a/include/mapalloc.h
+++ b/include/mapalloc.h
@@ -3,9 +3,16 @@
#include <stddef.h> /* for the definition of size_t */
-void *map_malloc(size_t n);
-void *map_calloc(size_t nelem, size_t elsize);
-void *map_realloc(void *ptr, size_t n);
-void map_free(void *ptr);
+void *MA_malloc(size_t n);
+void *MA_calloc(size_t nelem, size_t elsize);
+void *MA_realloc(void *ptr, size_t n);
+void MA_free(void *ptr);
+
+#ifdef MA_OVERRIDE_STDLIB
+#define malloc(n) MA_malloc(n)
+#define calloc(n, e) MA_calloc(n, e)
+#define realloc(p, n) MA_realloc(p, n)
+#define free(p) MA_free(p)
+#endif
#endif