mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
VM: Remove PhysicalPage::create_eternal().
Now that it is possible to create non-eternal non-freeable pages, PageDirectory can do just that.
This commit is contained in:
parent
010314ee66
commit
d900fe98e2
3 changed files with 1 additions and 9 deletions
|
@ -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)
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue