aboutsummaryrefslogtreecommitdiff
path: root/include/alloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/alloc.h')
-rw-r--r--include/alloc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/alloc.h b/include/alloc.h
new file mode 100644
index 0000000..35223b3
--- /dev/null
+++ b/include/alloc.h
@@ -0,0 +1,14 @@
+#ifndef AMALGAM_ALLOC_H
+#define AMALGAM_ALLOC_H
+
+#include "types.h"
+#include "misc.h"
+
+#define ALLOC_OK 0
+#define ALLOC_FAIL -1
+
+WARN_UNUSED_RESULT int am_malloc(usize size, void **mem);
+WARN_UNUSED_RESULT int am_realloc(void *mem, usize new_size, void **new_mem);
+void am_free(void *mem);
+
+#endif