From 9072c2a277c0da298b977cf4fb3dbebb5481abd0 Mon Sep 17 00:00:00 2001 From: Fabian Imhof Date: Sun, 1 Dec 2024 13:34:46 +0000 Subject: implement clear_memory_block_header --- arch/x86_64/include/arch/memory/heap/linked_list_allocator.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/x86_64/include') diff --git a/arch/x86_64/include/arch/memory/heap/linked_list_allocator.hpp b/arch/x86_64/include/arch/memory/heap/linked_list_allocator.hpp index 236d366..7432561 100644 --- a/arch/x86_64/include/arch/memory/heap/linked_list_allocator.hpp +++ b/arch/x86_64/include/arch/memory/heap/linked_list_allocator.hpp @@ -59,6 +59,9 @@ namespace teachos::arch::memory::heap auto coalesce_free_memory_block(memory_block *& previous_block, memory_block *& current_block, void * pointer, std::size_t size) -> void; + // We cannot call delete, because it causes "undefined reference to `sbrk`". + auto clear_memory_block_header(void * pointer) -> void; + std::size_t heap_start; ///< Start of the allocatable heap area std::size_t heap_end; ///< End of the allocatable heap area memory_block * first; ///< First free entry in our memory -- cgit v1.2.3