diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2019-06-14 17:10:49 +0300 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-06-14 16:14:49 +0200 |
commit | d900fe98e23318219f3cea406a0734037893bc95 (patch) | |
tree | eb4a07f0250b95e16a09ee1bc688be1733f229d3 /Kernel | |
parent | 010314ee66abeb539daf9e382453c14f0f4ca7c3 (diff) | |
download | serenity-d900fe98e23318219f3cea406a0734037893bc95.zip |
VM: Remove PhysicalPage::create_eternal().
Now that it is possible to create non-eternal non-freeable
pages, PageDirectory can do just that.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/VM/PageDirectory.cpp | 2 | ||||
-rw-r--r-- | Kernel/VM/PhysicalPage.cpp | 7 | ||||
-rw-r--r-- | Kernel/VM/PhysicalPage.h | 1 |
3 files changed, 1 insertions, 9 deletions
diff --git a/Kernel/VM/PageDirectory.cpp b/Kernel/VM/PageDirectory.cpp index 633d0f4d86..7bc5ff3932 100644 --- a/Kernel/VM/PageDirectory.cpp +++ b/Kernel/VM/PageDirectory.cpp @@ -9,7 +9,7 @@ static const dword kernelspace_range_base = 0xc0000000; PageDirectory::PageDirectory(PhysicalAddress paddr) : m_range_allocator(VirtualAddress(0xc0000000), 0x3f000000) { - m_directory_page = PhysicalPage::create_eternal(paddr, true); + m_directory_page = PhysicalPage::create(paddr, true, false); } PageDirectory::PageDirectory(const RangeAllocator* parent_range_allocator) diff --git a/Kernel/VM/PhysicalPage.cpp b/Kernel/VM/PhysicalPage.cpp index 952d95942c..adc64e870b 100644 --- a/Kernel/VM/PhysicalPage.cpp +++ b/Kernel/VM/PhysicalPage.cpp @@ -2,13 +2,6 @@ #include <Kernel/VM/PhysicalPage.h> #include <Kernel/kmalloc.h> -Retained<PhysicalPage> PhysicalPage::create_eternal(PhysicalAddress paddr, bool supervisor) -{ - void* slot = kmalloc_eternal(sizeof(PhysicalPage)); - new (slot) PhysicalPage(paddr, supervisor, false); - return adopt(*(PhysicalPage*)slot); -} - Retained<PhysicalPage> PhysicalPage::create(PhysicalAddress paddr, bool supervisor, bool may_return_to_freelist) { void* slot = kmalloc(sizeof(PhysicalPage)); diff --git a/Kernel/VM/PhysicalPage.h b/Kernel/VM/PhysicalPage.h index b3b975ca69..7d5c8c9426 100644 --- a/Kernel/VM/PhysicalPage.h +++ b/Kernel/VM/PhysicalPage.h @@ -28,7 +28,6 @@ public: } } - static Retained<PhysicalPage> create_eternal(PhysicalAddress, bool supervisor); static Retained<PhysicalPage> create(PhysicalAddress, bool supervisor, bool may_return_to_freelist = true); word retain_count() const { return m_retain_count; } |