mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-31 19:30:03 +00:00
fix aligned arena push
This commit is contained in:
@@ -118,12 +118,12 @@ arena_push(Arena *arena, U64 size, U64 align)
|
|||||||
U64 cmt_size = current->cmt_size;
|
U64 cmt_size = current->cmt_size;
|
||||||
if(size + ARENA_HEADER_SIZE > res_size)
|
if(size + ARENA_HEADER_SIZE > res_size)
|
||||||
{
|
{
|
||||||
res_size = size + ARENA_HEADER_SIZE;
|
res_size = AlignPow2(size + ARENA_HEADER_SIZE, align);
|
||||||
cmt_size = size + ARENA_HEADER_SIZE;
|
cmt_size = AlignPow2(size + ARENA_HEADER_SIZE, align);
|
||||||
}
|
}
|
||||||
new_block = arena_alloc(.reserve_size = res_size,
|
new_block = arena_alloc(.reserve_size = res_size,
|
||||||
.commit_size = cmt_size,
|
.commit_size = cmt_size,
|
||||||
.flags = current->flags);
|
.flags = current->flags);
|
||||||
new_block->base_pos = current->base_pos + current->res;
|
new_block->base_pos = current->base_pos + current->res;
|
||||||
SLLStackPush_N(arena->current, new_block, prev);
|
SLLStackPush_N(arena->current, new_block, prev);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user