Introduce the allocator stuff again

This commit is contained in:
Krzosa Karol
2022-12-31 16:51:01 +01:00
parent e20edaa3a2
commit 55515ff420
12 changed files with 71 additions and 44 deletions

View File

@@ -55,7 +55,7 @@ bigint_copy(Arena *allocator, BigInt *src){
dest.digit_count = src->digit_count;
count_bigint_alloc();
dest.digits = arena_push_array(allocator, uint64_t, dest.digit_count, AF_ZeroMemory);
dest.digits = allocate_array(allocator, uint64_t, dest.digit_count);
memcpy(dest.digits, src->digits, sizeof(uint64_t) * dest.digit_count);
return dest;
}