mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel: Don't release file-pages if volatile memory purge did it
This commit is contained in:
parent
3c7b0dab0b
commit
ec4b83326b
Notes:
sideshowbarker
2024-07-18 00:34:07 +09:00
Author: https://github.com/Jorropo Commit: https://github.com/SerenityOS/serenity/commit/ec4b83326b Pull-request: https://github.com/SerenityOS/serenity/pull/14862
1 changed files with 6 additions and 4 deletions
|
@ -942,6 +942,8 @@ ErrorOr<NonnullRefPtr<PhysicalPage>> MemoryManager::allocate_physical_page(Shoul
|
|||
}
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
}
|
||||
if (!page) {
|
||||
// Second, we look for a file-backed VMObject with clean pages.
|
||||
for_each_vmobject([&](auto& vmobject) {
|
||||
if (!vmobject.is_inode())
|
||||
|
@ -956,10 +958,10 @@ ErrorOr<NonnullRefPtr<PhysicalPage>> MemoryManager::allocate_physical_page(Shoul
|
|||
}
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
if (!page) {
|
||||
dmesgln("MM: no physical pages available");
|
||||
return ENOMEM;
|
||||
}
|
||||
}
|
||||
if (!page) {
|
||||
dmesgln("MM: no physical pages available");
|
||||
return ENOMEM;
|
||||
}
|
||||
|
||||
if (should_zero_fill == ShouldZeroFill::Yes) {
|
||||
|
|
Loading…
Reference in a new issue