From 086c5439f27d803ea84445f81f7a0006681dc585 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 16 Jan 2026 13:41:46 +0100 Subject: kapi/memory: move buffered allocator --- arch/x86_64/kapi/memory.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'arch/x86_64/kapi/memory.cpp') diff --git a/arch/x86_64/kapi/memory.cpp b/arch/x86_64/kapi/memory.cpp index e366ee1..b71fa17 100644 --- a/arch/x86_64/kapi/memory.cpp +++ b/arch/x86_64/kapi/memory.cpp @@ -1,12 +1,12 @@ #include "kapi/memory.hpp" #include "kapi/boot.hpp" +#include "kapi/memory/buffered_allocator.hpp" #include "kapi/system.hpp" #include "arch/boot/boot.hpp" #include "arch/boot/ld.hpp" #include "arch/cpu/registers.hpp" -#include "arch/memory/buffered_allocator.hpp" #include "arch/memory/kernel_mapper.hpp" #include "arch/memory/mmu.hpp" #include "arch/memory/page_table.hpp" @@ -151,7 +151,7 @@ namespace kapi::memory } auto constinit region_based_allocator = std::optional{}; - auto constinit buffered_allocator = std::optional>{}; + auto constinit allocation_buffer = std::optional>{}; auto constinit recursive_page_mapper = std::optional{}; } // namespace @@ -170,12 +170,12 @@ namespace kapi::memory enable_cpu_protections(); region_based_allocator.emplace(collect_memory_information()); - buffered_allocator.emplace(&*region_based_allocator); - recursive_page_mapper.emplace(*buffered_allocator); + allocation_buffer.emplace(&*region_based_allocator); + recursive_page_mapper.emplace(*allocation_buffer); kstd::println("[x86_64:MEM] Preparing new paging hierarchy."); - auto new_pml4_frame = inject_faux_pml4(*buffered_allocator, *recursive_page_mapper); + auto new_pml4_frame = inject_faux_pml4(*allocation_buffer, *recursive_page_mapper); remap_kernel(*recursive_page_mapper); remap_vga_text_mode_buffer(*recursive_page_mapper); @@ -187,7 +187,7 @@ namespace kapi::memory cr3.frame(new_pml4_frame); arch::cpu::cr3::write(cr3); - set_frame_allocator(*buffered_allocator); + set_frame_allocator(*allocation_buffer); set_page_mapper(*recursive_page_mapper); } -- cgit v1.2.3