diff --git a/kernel/src/memory/Heap.cpp b/kernel/src/memory/Heap.cpp index 41ddf176..dfd0ae5f 100644 --- a/kernel/src/memory/Heap.cpp +++ b/kernel/src/memory/Heap.cpp @@ -185,7 +185,9 @@ Result kmalloc(usize size) block->next = block->last = nullptr; heap_start = block; - if (!heap_end) heap_end = heap_start; + check(!heap_end); + + heap_end = heap_start; } HeapBlock* block = heap_start;