Add sanity check
This commit is contained in:
parent
bde3d55eb2
commit
ee76bdf84d
@ -185,7 +185,9 @@ Result<void*> kmalloc(usize size)
|
|||||||
block->next = block->last = nullptr;
|
block->next = block->last = nullptr;
|
||||||
heap_start = block;
|
heap_start = block;
|
||||||
|
|
||||||
if (!heap_end) heap_end = heap_start;
|
check(!heap_end);
|
||||||
|
|
||||||
|
heap_end = heap_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
HeapBlock* block = heap_start;
|
HeapBlock* block = heap_start;
|
||||||
|
Loading…
Reference in New Issue
Block a user