1
0
Fork 0

Removed: memory alignment tests

Browse Source
This commit is contained in:
rhuibertsjr 2024-04-26 18:04:59 +02:00
parent 4cc6fce555
commit 1d00bf01f6
2 changed files with 3 additions and 2 deletions

View File

@ -59,6 +59,7 @@ arena_allocate(Arena *arena, u64 size)
sll_stack_push(arena->current, new_memory_bock, prev); sll_stack_push(arena->current, new_memory_bock, prev);
current = new_memory_bock; current = new_memory_bock;
pos_mem = pos_mem =
memory_align_power_of_two(current->offset, ARENA_DEFAULT_ALIGNMENT); memory_align_power_of_two(current->offset, ARENA_DEFAULT_ALIGNMENT);
pos_new = current->offset + size; pos_new = current->offset + size;

View File

@ -9,8 +9,8 @@ int
main(void) main(void)
{ {
Arena *arena = arena_initialize_default(); Arena *arena = arena_initialize_default();
u64* ptr1 = arena_allocate(arena, KB(3));
u64* ptr2 = arena_allocate(arena, KB(2)); /* lifetime of objects */
arena_release(arena); arena_release(arena);
return 0; return 0;