diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-10-28 10:15:18 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-10-28 10:15:18 +0000 |
| commit | 04b0285d8329e45cea426aa1a8e69203685a4467 (patch) | |
| tree | 00c55d9dffddf3724da38b07427cf3460f883b1e /arch/x86_64/src/memory/allocator | |
| parent | 58d01f6aae80a66faa5163602c399c28dcf30cb6 (diff) | |
| download | kernel-04b0285d8329e45cea426aa1a8e69203685a4467.tar.xz kernel-04b0285d8329e45cea426aa1a8e69203685a4467.zip | |
Move iterator and container into generic template classes. Use algorithms instead of raw pointer for loops
Diffstat (limited to 'arch/x86_64/src/memory/allocator')
| -rw-r--r-- | arch/x86_64/src/memory/allocator/area_frame_allocator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/src/memory/allocator/area_frame_allocator.cpp b/arch/x86_64/src/memory/allocator/area_frame_allocator.cpp index 6ed4f28..e03c66a 100644 --- a/arch/x86_64/src/memory/allocator/area_frame_allocator.cpp +++ b/arch/x86_64/src/memory/allocator/area_frame_allocator.cpp @@ -9,9 +9,9 @@ namespace teachos::arch::memory::allocator { area_frame_allocator::area_frame_allocator(multiboot::memory_information mem_info) - : next_free_frame(0) + : next_free_frame(0U) , current_area(std::nullopt) - , memory_areas(mem_info.memory_areas, mem_info.area_count) + , memory_areas(mem_info.begin_area, mem_info.end_area) , kernel_start(physical_frame::containing_address(mem_info.kernel_start)) , kernel_end(physical_frame::containing_address(mem_info.kernel_end)) , multiboot_start(physical_frame::containing_address(mem_info.multiboot_start)) |
