feat: changed usage of leaks for our own leak detector by reference counting

This commit is contained in:
2026-01-11 11:08:33 +02:00
parent 8bc3fa085e
commit fb89b45fef
5 changed files with 14 additions and 9 deletions

View File

@@ -1,7 +1,9 @@
#define N_INTS_TEST 4
#define NIARENA_ARENA_SIZE (N_INTS_TEST * sizeof(int))
#define NIARENA_IMPLEMENTATION
#define NILEAKDETECTOR_VERBOSE true
#include "../../ni-leakdetector/nileakdetector.h"
#include "../niarena.h"
#include <assert.h>
#include <stdio.h>
@@ -14,6 +16,7 @@ test_arena_new()
assert(arena->offset == 0);
assert(arena->capacity == (N_INTS_TEST * sizeof(int)));
niarena_delete(arena);
nileakdetector_print_summary();
}
void
@@ -40,6 +43,7 @@ test_arena_allocations()
}
niarena_delete(arena);
nileakdetector_print_summary();
}
int