summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-03-01 22:39:50 +0100
committerFabrice <fabrice@schaub-dev.xyz>2026-03-01 22:39:50 +0100
commita07e37de3f2b56b577da32b33d3dec45e0cd43b6 (patch)
treebf7f397e04ca87fbd6f3b8f41b86e493ec1a6f26 /src
parent6224b633ffd1692fdb4e9422fe5ee7d9db37d565 (diff)
use mi directly
Diffstat (limited to 'src')
-rw-r--r--src/memory.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/memory.cc b/src/memory.cc
index c27c6f3..518b761 100644
--- a/src/memory.cc
+++ b/src/memory.cc
@@ -2,8 +2,8 @@
#define MEMORY_CC
#include "common.cc"
-#include <cstdlib>
#include <cstring>
+#include <mimalloc.h>
typedef u8* (*Allocator_Allocate)(u8* self, usize length, usize align);
typedef void (*Allocator_Deallocate)(u8* self, u8* ptr);
@@ -24,12 +24,12 @@ void deallocate(Allocator* allocator, u8* ptr) {
static inline u8* heap_allocate(u8* self, usize size, usize align) {
(void)self;
- return (u8*)aligned_alloc(align, size);
+ return (u8*)mi_aligned_alloc(align, size);
}
static inline void heap_deallocate(u8* self, u8* ptr) {
(void)self;
- free(ptr);
+ mi_free(ptr);
}
Allocator* heap_allocator() {