aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/x86_64/memory/region_allocator.hpp7
1 files changed, 4 insertions, 3 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 a918195..913b0bb 100644
--- a/arch/x86_64/include/x86_64/memory/region_allocator.hpp
+++ b/arch/x86_64/include/x86_64/memory/region_allocator.hpp
@@ -3,6 +3,7 @@
#include "kapi/memory/address.hpp"
#include "kapi/memory/frame.hpp"
+#include "kapi/memory/frame_allocator.hpp"
#include <multiboot2/information.hpp>
@@ -15,7 +16,7 @@ namespace teachos::memory::x86_64
* @brief Allocates memory linearly using memory areas read from the multiboot2 information pointer and leaks any
* deallocated frames.
*/
- struct region_allocator
+ struct region_allocator final : frame_allocator
{
struct memory_information
{
@@ -43,7 +44,7 @@ namespace teachos::memory::x86_64
*
* @return next free physical frame or nullopt if none was found.
*/
- auto allocate_frame() -> std::optional<frame>;
+ auto allocate() -> std::optional<frame> override;
/**
* @brief Deallocates a previously allocated physical frame.
@@ -54,7 +55,7 @@ namespace teachos::memory::x86_64
*
* @param physical_frame Previously allocated physical_frame that should be deallocated.
*/
- auto deallocate_frame(frame const & physical_frame) -> void;
+ auto release(frame frame) -> void override;
private:
/**