mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:27:44 +00:00
Kernel: Assert on OOM in Region::commit()
This function has a lot of callers that don't bother checking if it returns successfully or not. We'll need to handle failure in a bunch of places and then we can remove this assertion.
This commit is contained in:
parent
43593455db
commit
c633c1c2ea
1 changed files with 1 additions and 0 deletions
|
@ -137,6 +137,7 @@ bool Region::commit(size_t page_index)
|
||||||
auto physical_page = MM.allocate_user_physical_page(MemoryManager::ShouldZeroFill::Yes);
|
auto physical_page = MM.allocate_user_physical_page(MemoryManager::ShouldZeroFill::Yes);
|
||||||
if (!physical_page) {
|
if (!physical_page) {
|
||||||
klog() << "MM: commit was unable to allocate a physical page";
|
klog() << "MM: commit was unable to allocate a physical page";
|
||||||
|
ASSERT_NOT_REACHED();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
vmobject_physical_page_entry = move(physical_page);
|
vmobject_physical_page_entry = move(physical_page);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue