aboutsummaryrefslogtreecommitdiff
path: root/include/alloc.h
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-02-24 02:10:58 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:40 +0200
commit11dc4b81935e3dfee997c421d8d6fa166edd7a05 (patch)
treeccb08be54209a4900c740c9ed58e8f9c2910811d /include/alloc.h
Initial commit, Function declaration work somewhat
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