mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 21:25:07 +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;
|
||||
|
||||
for_each_region([&](auto& region) {
|
||||
region.remap();
|
||||
});
|
||||
if (purged_page_count > 0) {
|
||||
for_each_region([&](auto& region) {
|
||||
if (®ion.vmobject() == this)
|
||||
region.remap();
|
||||
});
|
||||
}
|
||||
|
||||
return purged_page_count;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue