aboutsummaryrefslogtreecommitdiffstats
path: root/common/almalloc.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-04-14 18:15:56 -0700
committerChris Robinson <[email protected]>2017-04-14 18:15:56 -0700
commitafb59e7f98f40cde77c150414a8a5bd13f40781a (patch)
tree45ff03dd2eaec63563ff518a035967675b47bd55 /common/almalloc.h
parentc5310d2e953c44eb33aa9bfa913e62adf11f20fd (diff)
Move internal headers out of the include directory
Diffstat (limited to 'common/almalloc.h')
-rw-r--r--common/almalloc.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/common/almalloc.h b/common/almalloc.h
new file mode 100644
index 00000000..8eadb5b3
--- /dev/null
+++ b/common/almalloc.h
@@ -0,0 +1,21 @@
+#ifndef AL_MALLOC_H
+#define AL_MALLOC_H
+
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Minimum alignment required by posix_memalign. */
+#define DEF_ALIGN sizeof(void*)
+
+void *al_malloc(size_t alignment, size_t size);
+void *al_calloc(size_t alignment, size_t size);
+void al_free(void *ptr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AL_MALLOC_H */