libluna: Assert some unreachable conditions
All checks were successful
Build and test / build (push) Successful in 1m48s
All checks were successful
Build and test / build (push) Successful in 1m48s
This commit is contained in:
parent
2780ee2ebc
commit
cdab3dea90
@ -166,12 +166,7 @@ static Result<void> combine_forward(HeapBlock* block)
|
|||||||
|
|
||||||
if (next->status & BLOCK_END_MEM)
|
if (next->status & BLOCK_END_MEM)
|
||||||
{
|
{
|
||||||
if (next->status & BLOCK_START_MEM)
|
if (next->status & BLOCK_START_MEM) { unreachable(); }
|
||||||
{
|
|
||||||
const usize pages = ceil_div(next->full_size + sizeof(HeapBlock), PAGE_SIZE);
|
|
||||||
TRY(release_pages_impl(next, pages));
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
block->status |= BLOCK_END_MEM;
|
block->status |= BLOCK_END_MEM;
|
||||||
}
|
}
|
||||||
@ -195,12 +190,7 @@ static Result<HeapBlock*> combine_backward(HeapBlock* block)
|
|||||||
|
|
||||||
if (block->status & BLOCK_END_MEM)
|
if (block->status & BLOCK_END_MEM)
|
||||||
{
|
{
|
||||||
if (block->status & BLOCK_START_MEM)
|
if (block->status & BLOCK_START_MEM) { unreachable(); }
|
||||||
{
|
|
||||||
const usize pages = ceil_div(block->full_size + sizeof(HeapBlock), PAGE_SIZE);
|
|
||||||
TRY(release_pages_impl(block, pages));
|
|
||||||
return last;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
last->status |= BLOCK_END_MEM;
|
last->status |= BLOCK_END_MEM;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user