aboutsummaryrefslogtreecommitdiffstats
path: root/include/alloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/alloc.h')
-rw-r--r--include/alloc.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/include/alloc.h b/include/alloc.h
index 6877f61..139b027 100644
--- a/include/alloc.h
+++ b/include/alloc.h
@@ -16,22 +16,8 @@ struct calt_alloc {
extern struct calt_alloc calt_get_alloc(void);
extern void calt_use_custom_alloc(struct calt_alloc allocator);
-
-inline void *calt_malloc(size_t size) {
- if (size) {
- struct calt_alloc alloc = calt_get_alloc();
- return alloc.malloc ? alloc.malloc(size) : NULL;
- } else {
- return NULL;
- }
-}
-
-inline void calt_free(void *ptr) {
- if (ptr) {
- calt_get_alloc().free(ptr);
- }
-}
-
+extern void *calt_malloc(size_t size);
+extern void calt_free(void *ptr);
extern void *calt_calloc(size_t size);
extern void *calt_realloc(void *ptr, size_t size);
extern void *calt_memdup(void const *restrict src, size_t len);