Start working on a VFS implementation #22

Closed
apio wants to merge 44 commits from oop-vfs into main
Showing only changes of commit 4697a16206 - Show all commits

View File

@ -130,6 +130,8 @@ static Result<void> combine_forward(HeapBlock* block)
heap.remove(next);
next->magic = BLOCK_DEAD;
block->full_size += next->full_size + sizeof(HeapBlock);
if (next->status & BLOCK_END_MEM)
{
if (next->status & BLOCK_START_MEM)
@ -142,8 +144,6 @@ static Result<void> combine_forward(HeapBlock* block)
block->status |= BLOCK_END_MEM;
}
block->full_size += next->full_size + sizeof(HeapBlock);
return {};
}
@ -159,6 +159,8 @@ static Result<HeapBlock*> combine_backward(HeapBlock* block)
heap.remove(block);
block->magic = BLOCK_DEAD;
last->full_size += block->full_size + sizeof(HeapBlock);
if (block->status & BLOCK_END_MEM)
{
if (block->status & BLOCK_START_MEM)
@ -171,8 +173,6 @@ static Result<HeapBlock*> combine_backward(HeapBlock* block)
last->status |= BLOCK_END_MEM;
}
last->full_size += block->full_size + sizeof(HeapBlock);
return last;
}