mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:47:34 +00:00
VM: Fix freeing physical pages.
Pages created with PhysicalPage::create_eternal() should *not* be returnable to the freelist; and pages created with the regular PhysicalPage::create() should be; not the other way around.
This commit is contained in:
parent
0589ef2886
commit
7710e48d83
1 changed files with 2 additions and 2 deletions
|
@ -5,14 +5,14 @@
|
||||||
Retained<PhysicalPage> PhysicalPage::create_eternal(PhysicalAddress paddr, bool supervisor)
|
Retained<PhysicalPage> PhysicalPage::create_eternal(PhysicalAddress paddr, bool supervisor)
|
||||||
{
|
{
|
||||||
void* slot = kmalloc_eternal(sizeof(PhysicalPage));
|
void* slot = kmalloc_eternal(sizeof(PhysicalPage));
|
||||||
new (slot) PhysicalPage(paddr, supervisor);
|
new (slot) PhysicalPage(paddr, supervisor, false);
|
||||||
return adopt(*(PhysicalPage*)slot);
|
return adopt(*(PhysicalPage*)slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
Retained<PhysicalPage> PhysicalPage::create(PhysicalAddress paddr, bool supervisor)
|
Retained<PhysicalPage> PhysicalPage::create(PhysicalAddress paddr, bool supervisor)
|
||||||
{
|
{
|
||||||
void* slot = kmalloc(sizeof(PhysicalPage));
|
void* slot = kmalloc(sizeof(PhysicalPage));
|
||||||
new (slot) PhysicalPage(paddr, supervisor, false);
|
new (slot) PhysicalPage(paddr, supervisor);
|
||||||
return adopt(*(PhysicalPage*)slot);
|
return adopt(*(PhysicalPage*)slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue