summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2019-06-14 16:40:25 +0300
committerAndreas Kling <awesomekling@gmail.com>2019-06-14 16:14:49 +0200
commita8e86841ce45ee3d5df285f52171ebcfde6750d5 (patch)
tree63bf6618033f149f7243b14d6d6ca918335312d0 /Kernel
parent6bb7c803650e739fcc25986b7eb29698b7a531cd (diff)
downloadserenity-a8e86841ce45ee3d5df285f52171ebcfde6750d5.zip
VM: Support non-freeable, non-eternal PhysicalPages.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/VM/PhysicalPage.cpp4
-rw-r--r--Kernel/VM/PhysicalPage.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/VM/PhysicalPage.cpp b/Kernel/VM/PhysicalPage.cpp
index 2ddb1d02a5..952d95942c 100644
--- a/Kernel/VM/PhysicalPage.cpp
+++ b/Kernel/VM/PhysicalPage.cpp
@@ -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);
}
diff --git a/Kernel/VM/PhysicalPage.h b/Kernel/VM/PhysicalPage.h
index 422cdbe03f..b3b975ca69 100644
--- a/Kernel/VM/PhysicalPage.h
+++ b/Kernel/VM/PhysicalPage.h
@@ -29,7 +29,7 @@ public:
}
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; }