retab everything to use tabs

This commit is contained in:
2025-12-03 19:38:43 +01:00
parent 1b33ace698
commit 9214b986ac
12 changed files with 473 additions and 443 deletions
+14 -14
View File
@@ -5,26 +5,26 @@
int main() {
// test 1///////////////////////////////////////////////////////////////////////
arena_allocator_t aalloc = arena_allocator_create();
arena_allocator_t aalloc = arena_allocator_create();
for ( int i = 0; i < 10; i++ ) with_arena(&aalloc, allocator) {
allocator_alloc(allocator, 10);
}
for ( int i = 0; i < 10; i++ ) with_arena(&aalloc, allocator) {
allocator_alloc(allocator, 10);
}
assert(aalloc.to_allocate == 10);
assert(borrow_allocator_count_allocations(&aalloc.borrow_allocator) == 0);
assert(dyn_array_capacity(aalloc.bytes) == 10);
assert(aalloc.to_allocate == 10);
assert(borrow_allocator_count_allocations(&aalloc.borrow_allocator) == 0);
assert(dyn_array_capacity(aalloc.bytes) == 10);
arena_allocator_destroy(&aalloc);
assert(aalloc.to_allocate == 0);
arena_allocator_destroy(&aalloc);
assert(aalloc.to_allocate == 0);
arena_allocator_destroy(&aalloc);
// test 2 //////////////////////////////////////////////////////////////////////
aalloc = arena_allocator_create();
aalloc = arena_allocator_create();
for ( int i = 0; i < 10; i++ ) with_arena(&aalloc, allocator) {
allocator_alloc(allocator, 1000);
}
for ( int i = 0; i < 10; i++ ) with_arena(&aalloc, allocator) {
allocator_alloc(allocator, 1000);
}
with_arena(&aalloc, allocator) {
size_t prev_addr = 0;
@@ -37,7 +37,7 @@ int main() {
}
arena_allocator_reset(&aalloc);
fprintf(stderr, "%zu\n", aalloc.to_allocate);
//assert(aalloc.to_allocate == MAX_ALIGN * 1000 + 1);
//assert(aalloc.to_allocate == MAX_ALIGN * 1000 + 1);
// TODO: WHAT is happening here?
arena_allocator_destroy(&aalloc);
}