mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
Make PhysicalPage eternally allocated.
This commit is contained in:
parent
3e37a1f5c3
commit
9eca2ffd41
2 changed files with 8 additions and 5 deletions
|
@ -655,6 +655,11 @@ Region::~Region()
|
||||||
MM.unregister_region(*this);
|
MM.unregister_region(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PhysicalPage::PhysicalPage(PhysicalAddress paddr)
|
||||||
|
: m_paddr(paddr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void PhysicalPage::return_to_freelist()
|
void PhysicalPage::return_to_freelist()
|
||||||
{
|
{
|
||||||
InterruptDisabler disabler;
|
InterruptDisabler disabler;
|
||||||
|
|
|
@ -20,10 +20,10 @@ enum class PageFaultResponse {
|
||||||
};
|
};
|
||||||
|
|
||||||
class PhysicalPage {
|
class PhysicalPage {
|
||||||
|
AK_MAKE_ETERNAL
|
||||||
friend class MemoryManager;
|
friend class MemoryManager;
|
||||||
friend class PageDirectory;
|
friend class PageDirectory;
|
||||||
public:
|
public:
|
||||||
~PhysicalPage() { }
|
|
||||||
PhysicalAddress paddr() const { return m_paddr; }
|
PhysicalAddress paddr() const { return m_paddr; }
|
||||||
|
|
||||||
void retain()
|
void retain()
|
||||||
|
@ -42,10 +42,8 @@ public:
|
||||||
unsigned retain_count() const { return m_retain_count; }
|
unsigned retain_count() const { return m_retain_count; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PhysicalPage(PhysicalAddress paddr)
|
explicit PhysicalPage(PhysicalAddress paddr);
|
||||||
: m_paddr(paddr)
|
~PhysicalPage() = delete;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void return_to_freelist();
|
void return_to_freelist();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue