138 alloc->free_failed = 0; |
138 alloc->free_failed = 0; |
139 alloc->free_total = 0; |
139 alloc->free_total = 0; |
140 size_t initial_capa = 16; |
140 size_t initial_capa = 16; |
141 alloc->tracked_capacity = initial_capa; |
141 alloc->tracked_capacity = initial_capa; |
142 alloc->tracked_count = 0; |
142 alloc->tracked_count = 0; |
143 alloc->tracked = calloc(sizeof(void *), initial_capa); |
143 alloc->tracked = calloc(initial_capa, sizeof(void *)); |
144 } |
144 } |
145 |
145 |
146 void cx_testing_allocator_destroy(CxTestingAllocator *alloc) { |
146 void cx_testing_allocator_destroy(CxTestingAllocator *alloc) { |
147 free(alloc->tracked); |
147 free(alloc->tracked); |
148 } |
148 } |