tests/util_allocator.c

branch
feature/tree_add
changeset 863
4a220afebad0
parent 861
bab51b32fcb1
child 890
54565fd74e74
equal deleted inserted replaced
860:558ed4c6abd0 863:4a220afebad0
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 }

mercurial