diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-02-03 16:33:46 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-03 23:33:20 +0100 |
commit | 8289727fac65688ae8df8859743516f3dee2ed9a (patch) | |
tree | 0522663959d1e1f09f74fc83cfd990c4813d67a7 /Kernel/Memory | |
parent | e5e7cb822a7d1beec3af5781dac275e441782632 (diff) | |
download | serenity-8289727fac65688ae8df8859743516f3dee2ed9a.zip |
Kernel: Stop using the make<T> factory method in the Kernel
As make<T> is infallible, it really should not be used anywhere in the
Kernel. Instead replace with fallible `new (nothrow)` calls, that will
eventually be error-propagated.
Diffstat (limited to 'Kernel/Memory')
-rw-r--r-- | Kernel/Memory/PhysicalRegion.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Memory/PhysicalRegion.cpp b/Kernel/Memory/PhysicalRegion.cpp index b9089b37bf..9c4edfbed8 100644 --- a/Kernel/Memory/PhysicalRegion.cpp +++ b/Kernel/Memory/PhysicalRegion.cpp @@ -48,7 +48,7 @@ void PhysicalRegion::initialize_zones() size_t zone_count = 0; auto first_address = base_address; while (remaining_pages >= pages_per_zone) { - m_zones.append(make<PhysicalZone>(base_address, pages_per_zone)); + m_zones.append(adopt_nonnull_own_or_enomem(new (nothrow) PhysicalZone(base_address, pages_per_zone)).release_value_but_fixme_should_propagate_errors()); base_address = base_address.offset(pages_per_zone * PAGE_SIZE); m_usable_zones.append(m_zones.last()); remaining_pages -= pages_per_zone; |