diff --git a/Kernel/VM/PhysicalPage.cpp b/Kernel/VM/PhysicalPage.cpp index acd12f5ddbc..36be738029c 100644 --- a/Kernel/VM/PhysicalPage.cpp +++ b/Kernel/VM/PhysicalPage.cpp @@ -46,7 +46,7 @@ void PhysicalPage::return_to_freelist() && InterruptDisabler disabler; - m_retain_count = 1; + m_ref_count = 1; if (m_supervisor) MM.deallocate_supervisor_physical_page(move(*this)); diff --git a/Kernel/VM/PhysicalPage.h b/Kernel/VM/PhysicalPage.h index d8dda694ea1..2606074daa0 100644 --- a/Kernel/VM/PhysicalPage.h +++ b/Kernel/VM/PhysicalPage.h @@ -42,14 +42,14 @@ public: void ref() { - ASSERT(m_retain_count); - ++m_retain_count; + ASSERT(m_ref_count); + ++m_ref_count; } void unref() { - ASSERT(m_retain_count); - if (!--m_retain_count) { + ASSERT(m_ref_count); + if (!--m_ref_count) { if (m_may_return_to_freelist) move(*this).return_to_freelist(); delete this; @@ -58,7 +58,7 @@ public: static NonnullRefPtr create(PhysicalAddress, bool supervisor, bool may_return_to_freelist = true); - u16 ref_count() const { return m_retain_count; } + u32 ref_count() const { return m_ref_count; } bool is_shared_zero_page() const; @@ -68,7 +68,7 @@ private: void return_to_freelist() &&; - u16 m_retain_count { 1 }; + u32 m_ref_count { 1 }; bool m_may_return_to_freelist { true }; bool m_supervisor { false }; PhysicalAddress m_paddr;