]> git.ozlabs.org Git - ccan/blobdiff - alloc/alloc.h
Initial cut at file/mem allocator (pages only)
[ccan] / alloc / alloc.h
diff --git a/alloc/alloc.h b/alloc/alloc.h
new file mode 100644 (file)
index 0000000..7d0aa14
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef ALLOC_H
+#define ALLOC_H
+#include <stdbool.h>
+
+void alloc_init(void *pool, unsigned long poolsize);
+void *alloc_get(void *pool, unsigned long poolsize,
+               unsigned long size, unsigned long align);
+void alloc_free(void *pool, unsigned long poolsize, void *free);
+bool alloc_check(void *pool, unsigned long poolsize);
+
+#endif /* ALLOC_H */