mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
Make PhysicalPage eternally allocated.
This commit is contained in:
parent
3e37a1f5c3
commit
9eca2ffd41
Notes:
sideshowbarker
2024-07-19 16:06:34 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/9eca2ffd412
2 changed files with 8 additions and 5 deletions
|
@ -655,6 +655,11 @@ Region::~Region()
|
|||
MM.unregister_region(*this);
|
||||
}
|
||||
|
||||
PhysicalPage::PhysicalPage(PhysicalAddress paddr)
|
||||
: m_paddr(paddr)
|
||||
{
|
||||
}
|
||||
|
||||
void PhysicalPage::return_to_freelist()
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue