From 4fdf7c2656eeff67bcb424c9a3d76abe78ad2f91 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 17 Dec 2025 16:29:52 +0100 Subject: x86_64/memory: simplify region allocator --- arch/x86_64/include/x86_64/memory/region_allocator.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/x86_64/include') 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; + 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 m_next_frame; //!< The next available frame. std::optional m_current_region; //!< The memory region currently used for allocation -- cgit v1.2.3