summaryrefslogtreecommitdiff
path: root/kit/allocator.h
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2024-11-17 05:24:04 +0100
committerMitya Selivanov <automainint@guattari.tech>2024-11-17 05:24:04 +0100
commitd5a727a062e4d727491f4e7f047269d60a93a8cf (patch)
tree565aec155ab056f1bef8ddc7dc78d52e65aa76b7 /kit/allocator.h
parent4ba961dcbf60f7c12f53f46baa261757e15d5931 (diff)
downloadsaw-d5a727a062e4d727491f4e7f047269d60a93a8cf.zip
Remove lots of dependencies
Diffstat (limited to 'kit/allocator.h')
-rw-r--r--kit/allocator.h50
1 files changed, 0 insertions, 50 deletions
diff --git a/kit/allocator.h b/kit/allocator.h
deleted file mode 100644
index 97e453e..0000000
--- a/kit/allocator.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef KIT_ALLOCATOR_H
-#define KIT_ALLOCATOR_H
-
-#include "types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum {
- KIT_ALLOC_TYPE_NONE,
- KIT_ALLOC_TYPE_DEFAULT,
- KIT_ALLOC_TYPE_BUFFER,
-};
-
-enum {
- KIT_ALLOCATE,
- KIT_ALLOCATE_ZERO,
- KIT_DEALLOCATE,
- KIT_REALLOCATE,
- KIT_REALLOCATE_ZERO,
- KIT_DEALLOCATE_ALL,
-};
-
-typedef struct {
- i32 type;
- i64 size;
- union {
- u8 *bytes;
- void *data;
- };
-} kit_allocator_t;
-
-// Application should implement this function if custom allocator
-// dispatch is enabled.
-//
-// See KIT_ENABLE_CUSTOM_ALLOC_DISPATCH macro.
-//
-void *kit_alloc_dispatch(kit_allocator_t *alloc, i32 request,
- i64 size, i64 previous_size, void *pointer);
-
-kit_allocator_t kit_alloc_default(void);
-
-kit_allocator_t kit_alloc_buffer(i64 size, void *buffer);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif