Make PhysicalPage eternally allocated.

This commit is contained in:
Andreas Kling 2018-12-31 20:25:42 +01:00
parent 3e37a1f5c3
commit 9eca2ffd41
Notes: sideshowbarker 2024-07-19 16:06:34 +09:00
2 changed files with 8 additions and 5 deletions

View file

@ -655,6 +655,11 @@ Region::~Region()
MM.unregister_region(*this);
}
PhysicalPage::PhysicalPage(PhysicalAddress paddr)
: m_paddr(paddr)
{
}
void PhysicalPage::return_to_freelist()
{
InterruptDisabler disabler;

View file

@ -20,10 +20,10 @@ enum class PageFaultResponse {
};
class PhysicalPage {
AK_MAKE_ETERNAL
friend class MemoryManager;
friend class PageDirectory;
public:
~PhysicalPage() { }
PhysicalAddress paddr() const { return m_paddr; }
void retain()
@ -42,10 +42,8 @@ public:
unsigned retain_count() const { return m_retain_count; }
private:
PhysicalPage(PhysicalAddress paddr)
: m_paddr(paddr)
{
}
explicit PhysicalPage(PhysicalAddress paddr);
~PhysicalPage() = delete;
void return_to_freelist();