use special valgrind option to detect memory leaks

I am hoping that this task fails now
This commit is contained in:
2025-10-11 03:18:34 +02:00
parent 86d5110b0b
commit 20cac1737e
3 changed files with 6 additions and 3 deletions
+4
View File
@@ -11,11 +11,15 @@ Test(borrow_allocator, test) {
borrow_allocator_reset(&balloc);
cr_assert_eq(0, borrow_allocator_count_allocations(&balloc));
borrow_allocator_assert_all_freed(&balloc);
void *foobar = malloc(1000);
(void)foobar;
}
#define IS_SIZE 900
Test(borrow_allocator, with) {
with_borrow(foo) {
with_borrow(bar) {
}
int *is = allocator_alloc(foo, sizeof(int) * IS_SIZE);
for (int i = 0; i < IS_SIZE; i++) is[i] = i;
is = allocator_alloc(foo, sizeof(int) * IS_SIZE);