diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-10-20 07:01:53 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-10-20 07:01:53 +0000 |
| commit | d728052d62470799f73f6d9a2b8baa2b0b357383 (patch) | |
| tree | c73e113315b27b3caaca2dac2f8d451d1a260b2d /arch/x86_64/src/memory/allocator | |
| parent | 7ebfe9e09efa84044d1470132b7f55ebf53a7f89 (diff) | |
| download | kernel-d728052d62470799f73f6d9a2b8baa2b0b357383.tar.xz kernel-d728052d62470799f73f6d9a2b8baa2b0b357383.zip | |
Add helper methods to phyisca frame
Diffstat (limited to 'arch/x86_64/src/memory/allocator')
| -rw-r--r-- | arch/x86_64/src/memory/allocator/area_frame_allocator.cpp | 4 | ||||
| -rw-r--r-- | arch/x86_64/src/memory/allocator/physical_frame.cpp | 5 |
2 files changed, 2 insertions, 7 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 9c344d8..c2cafce 100644 --- a/arch/x86_64/src/memory/allocator/area_frame_allocator.cpp +++ b/arch/x86_64/src/memory/allocator/area_frame_allocator.cpp @@ -87,8 +87,8 @@ namespace teachos::arch::memory::allocator auto area_frame_allocator::deallocate_frame(physical_frame physical_frame) -> void { - arch::exception_handling::assert(false && physical_frame.frame_number == 0, - "[deallocate_frame] Not implemented Exception"); + exception_handling::assert(false && physical_frame.frame_number == 0, + "[deallocate_frame] Not implemented Exception"); } auto area_frame_allocator::begin() -> multiboot::memory_area_iterator { return area_begin; } diff --git a/arch/x86_64/src/memory/allocator/physical_frame.cpp b/arch/x86_64/src/memory/allocator/physical_frame.cpp index 03ec193..03bd965 100644 --- a/arch/x86_64/src/memory/allocator/physical_frame.cpp +++ b/arch/x86_64/src/memory/allocator/physical_frame.cpp @@ -2,11 +2,6 @@ namespace teachos::arch::memory::allocator { - namespace - { - constexpr std::size_t PAGE_FRAME_SIZE = 4096U; ///< Default page size of x86_84 is always 4KiB. - } - physical_frame::physical_frame(std::size_t frame_number) : frame_number(frame_number) { |
