diff --git a/kernel/src/memory/Heap.cpp b/kernel/src/memory/Heap.cpp index ec590d74..fa663dce 100644 --- a/kernel/src/memory/Heap.cpp +++ b/kernel/src/memory/Heap.cpp @@ -175,7 +175,7 @@ Result kmalloc(usize size, bool should_scrub) size = align_up<16>(size); - if (!heap.first().has_value()) + if (heap.count() == 0) { const usize pages = get_pages_for_allocation(size + sizeof(HeapBlock)); HeapBlock* const block = TRY(allocate_pages(pages));