aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-10-29 12:24:41 +0100
committerFelix Morgner <felix.morgner@ost.ch>2025-10-29 12:24:41 +0100
commit40e67a6dba7837c562613016bdc8bad17d069e57 (patch)
tree375e2899e594bf3b2ed4fb24a19fa774c8052297
parentf06fc25b9a54a800c5301eec7320903380da947c (diff)
downloadteachos-40e67a6dba7837c562613016bdc8bad17d069e57.tar.xz
teachos-40e67a6dba7837c562613016bdc8bad17d069e57.zip
x86_64/memory: fix region allocator initialization
During construction, the memory map was not extracted from the supplied memory information. This lead to a situation in which the allocator would never allocate any frames since it believed that there was no memory in the system.
-rw-r--r--arch/x86_64/src/memory/region_allocator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86_64/src/memory/region_allocator.cpp b/arch/x86_64/src/memory/region_allocator.cpp
index d94e810..13103c7 100644
--- a/arch/x86_64/src/memory/region_allocator.cpp
+++ b/arch/x86_64/src/memory/region_allocator.cpp
@@ -26,7 +26,7 @@ namespace teachos::memory::x86_64
region_allocator::region_allocator(memory_information const & mem_info)
: m_next_frame{}
, m_current_region{}
- , m_memory_map{}
+ , m_memory_map{mem_info.memory_map}
, m_kernel_start(frame::containing(mem_info.image_range.first))
, m_kernel_end(frame::containing(mem_info.image_range.second))
, m_multiboot_start(frame::containing(mem_info.mbi_range.first))