mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-17 00:23:00 +00:00
VM: Support non-freeable, non-eternal PhysicalPages.
This commit is contained in:
parent
6bb7c80365
commit
a8e86841ce
Notes:
sideshowbarker
2024-07-19 13:36:44 +09:00
Author: https://github.com/bugaevc
Commit: a8e86841ce
Pull-request: https://github.com/SerenityOS/serenity/pull/229
2 changed files with 3 additions and 3 deletions
|
@ -9,10 +9,10 @@ Retained<PhysicalPage> PhysicalPage::create_eternal(PhysicalAddress paddr, bool
|
||||||
return adopt(*(PhysicalPage*)slot);
|
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));
|
void* slot = kmalloc(sizeof(PhysicalPage));
|
||||||
new (slot) PhysicalPage(paddr, supervisor);
|
new (slot) PhysicalPage(paddr, supervisor, may_return_to_freelist);
|
||||||
return adopt(*(PhysicalPage*)slot);
|
return adopt(*(PhysicalPage*)slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
static Retained<PhysicalPage> create_eternal(PhysicalAddress, bool supervisor);
|
static Retained<PhysicalPage> create_eternal(PhysicalAddress, bool supervisor);
|
||||||
static Retained<PhysicalPage> create(PhysicalAddress, bool supervisor);
|
static Retained<PhysicalPage> create(PhysicalAddress, bool supervisor, bool may_return_to_freelist = true);
|
||||||
|
|
||||||
word retain_count() const { return m_retain_count; }
|
word retain_count() const { return m_retain_count; }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue