mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
Kernel: Only remap regions if memory was purged from them
This commit is contained in:
parent
55c4866370
commit
eb1cc5d665
Notes:
sideshowbarker
2024-07-19 02:56:06 +09:00
Author: https://github.com/tomuta
Commit: eb1cc5d665
Pull-request: https://github.com/SerenityOS/serenity/pull/3384
Issue: https://github.com/SerenityOS/serenity/issues/3370
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