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

Kernel: Don't assert on OOM in allocate_user_physical_page()

We now give callers a chance to react to OOM situations.
This commit is contained in:
Andreas Kling 2020-05-06 21:09:16 +02:00
parent bf7b77e252
commit 43593455db

View file

@ -448,7 +448,6 @@ RefPtr<PhysicalPage> MemoryManager::allocate_user_physical_page(ShouldZeroFill s
if (purged_page_count) {
klog() << "MM: Purge saved the day! Purged " << purged_page_count << " pages from PurgeableVMObject{" << &purgeable_vmobject << "}";
page = find_free_user_physical_page();
ASSERT(page);
return IterationDecision::Break;
}
}
@ -457,7 +456,6 @@ RefPtr<PhysicalPage> MemoryManager::allocate_user_physical_page(ShouldZeroFill s
if (!page) {
klog() << "MM: no user physical pages available";
ASSERT_NOT_REACHED();
return {};
}
}