aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-12-17 16:29:52 +0100
committerFelix Morgner <felix.morgner@ost.ch>2025-12-17 16:29:52 +0100
commit4fdf7c2656eeff67bcb424c9a3d76abe78ad2f91 (patch)
tree5d87c2b3dd60a876a0a121ca1369666be0663f5b /arch/x86_64/include
parent8de374be7b860f26155b47aa92e177b72497af94 (diff)
downloadteachos-4fdf7c2656eeff67bcb424c9a3d76abe78ad2f91.tar.xz
teachos-4fdf7c2656eeff67bcb424c9a3d76abe78ad2f91.zip
x86_64/memory: simplify region allocator
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/x86_64/memory/region_allocator.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86_64/include/x86_64/memory/region_allocator.hpp b/arch/x86_64/include/x86_64/memory/region_allocator.hpp
index 84b7a94..bf657a0 100644
--- a/arch/x86_64/include/x86_64/memory/region_allocator.hpp
+++ b/arch/x86_64/include/x86_64/memory/region_allocator.hpp
@@ -61,9 +61,12 @@ namespace teachos::memory::x86_64
//! @note This implementation will never actually release any frames.
auto release(frame frame) -> void override;
+ auto next_free_frame() noexcept -> std::optional<frame>;
+
private:
//! Find the next memory area and write it into current_area.
- auto choose_next_area() -> void;
+ auto choose_next_region() -> void;
+ auto find_next_frame() -> std::optional<frame>;
frame m_next_frame; //!< The next available frame.
std::optional<region> m_current_region; //!< The memory region currently used for allocation