1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:58:11 +00:00

Kernel: Purging a page should point it back to the shared zero page

Anonymous VM objects should never have null entries in their physical
page list. Instead, "empty" or untouched pages should refer to the
shared zero page.

Fixes #1237.
This commit is contained in:
Andreas Kling 2020-02-18 09:54:34 +01:00
parent 52c76aa9bf
commit 4b16ac0034

View file

@ -76,7 +76,7 @@ int PurgeableVMObject::purge_impl()
for (size_t i = 0; i < m_physical_pages.size(); ++i) {
if (m_physical_pages[i])
++purged_page_count;
m_physical_pages[i] = nullptr;
m_physical_pages[i] = MM.shared_zero_page();
}
m_was_purged = true;