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

AK: Make Bitmap construction OOM-fallible

This commit is contained in:
Idan Horowitz 2022-02-10 18:53:26 +02:00
parent 1667a80ade
commit 871a53db76
6 changed files with 44 additions and 32 deletions

View file

@ -253,7 +253,7 @@ NonnullRefPtr<PhysicalPage> AnonymousVMObject::allocate_committed_page(Badge<Reg
Bitmap& AnonymousVMObject::ensure_cow_map()
{
if (m_cow_map.is_null())
m_cow_map = Bitmap { page_count(), true };
m_cow_map = Bitmap::try_create(page_count(), true).release_value_but_fixme_should_propagate_errors();
return m_cow_map;
}