VM: Support non-freeable, non-eternal PhysicalPages.

This commit is contained in:
Sergey Bugaev 2019-06-14 16:40:25 +03:00 committed by Andreas Kling
parent 6bb7c80365
commit a8e86841ce
Notes: sideshowbarker 2024-07-19 13:36:44 +09:00
2 changed files with 3 additions and 3 deletions

View file

@ -9,10 +9,10 @@ Retained<PhysicalPage> PhysicalPage::create_eternal(PhysicalAddress paddr, bool
return adopt(*(PhysicalPage*)slot);
}
Retained<PhysicalPage> PhysicalPage::create(PhysicalAddress paddr, bool supervisor)
Retained<PhysicalPage> PhysicalPage::create(PhysicalAddress paddr, bool supervisor, bool may_return_to_freelist)
{
void* slot = kmalloc(sizeof(PhysicalPage));
new (slot) PhysicalPage(paddr, supervisor);
new (slot) PhysicalPage(paddr, supervisor, may_return_to_freelist);
return adopt(*(PhysicalPage*)slot);
}