mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 16:15:08 +00:00
Kernel: Only remap regions if memory was purged from them
This commit is contained in:
parent
55c4866370
commit
eb1cc5d665
1 changed files with 6 additions and 3 deletions
|
@ -82,9 +82,12 @@ int PurgeableVMObject::purge_impl()
|
||||||
}
|
}
|
||||||
m_was_purged = true;
|
m_was_purged = true;
|
||||||
|
|
||||||
|
if (purged_page_count > 0) {
|
||||||
for_each_region([&](auto& region) {
|
for_each_region([&](auto& region) {
|
||||||
|
if (®ion.vmobject() == this)
|
||||||
region.remap();
|
region.remap();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return purged_page_count;
|
return purged_page_count;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue