diff --git a/kernel/src/memory/Heap.cpp b/kernel/src/memory/Heap.cpp index f47fd530..10f558aa 100644 --- a/kernel/src/memory/Heap.cpp +++ b/kernel/src/memory/Heap.cpp @@ -94,14 +94,14 @@ static usize get_fair_offset_to_split_at(HeapBlock* block, usize min) return available + block->req_size; } -static Result split(HeapBlock* block, usize size) +static Option split(HeapBlock* block, usize size) { const usize available = space_available(block); // How much space can we steal from this block? const usize old_size = block->full_size; // Save the old value of this variable since we are going to use it after modifying it if (available < (size + sizeof(HeapBlock))) - return err(ENONE); // This block hasn't got enough free space to hold the requested size. + return {}; // This block hasn't got enough free space to hold the requested size. const usize offset = get_fair_offset_to_split_at(block, size + sizeof(HeapBlock)); block->full_size = offset; // shrink the old block to fit this offset