From 9edc6966db1b1a1327e582bad0e1ba7d56ba2329 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sat, 21 Feb 2026 03:59:22 +0200 Subject: [PATCH] BAN: Add reallocator definition for the moment this does not exist in kernel, kmalloc rewrite soon:tm: --- BAN/include/BAN/New.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/BAN/include/BAN/New.h b/BAN/include/BAN/New.h index 3602fb30..0a04448c 100644 --- a/BAN/include/BAN/New.h +++ b/BAN/include/BAN/New.h @@ -9,10 +9,12 @@ namespace BAN { #if defined(__is_kernel) - static constexpr void*(&allocator)(size_t) = kmalloc; - static constexpr void(&deallocator)(void*) = kfree; + static constexpr void*(*allocator)(size_t) = kmalloc; + static constexpr void*(*reallocator)(void*, size_t) = nullptr; + static constexpr void(*deallocator)(void*) = kfree; #else - static constexpr void*(&allocator)(size_t) = malloc; - static constexpr void(&deallocator)(void*) = free; + static constexpr void*(*allocator)(size_t) = malloc; + static constexpr void*(*reallocator)(void*, size_t) = realloc; + static constexpr void(*deallocator)(void*) = free; #endif }