test/util_allocator.c

changeset 494
6ce8cfa10a96
parent 422
afd87df80b13
child 500
eb9e7bd40a8e
equal deleted inserted replaced
493:e3469b497eff 494:6ce8cfa10a96
117 117
118 void cxTestingAllocatorReset(void) { 118 void cxTestingAllocatorReset(void) {
119 memset(&cx_testing_allocator_data, 0, sizeof(cx_testing_allocator_s)); 119 memset(&cx_testing_allocator_data, 0, sizeof(cx_testing_allocator_s));
120 } 120 }
121 121
122 int cxTestingAllocatorVerify(void) { 122 bool cxTestingAllocatorVerify(void) {
123 return cx_testing_allocator_data.live == 0 123 return cx_testing_allocator_data.live == 0
124 && cx_testing_allocator_data.alloc_failed == 0 && cx_testing_allocator_data.free_failed == 0 124 && cx_testing_allocator_data.alloc_failed == 0 && cx_testing_allocator_data.free_failed == 0
125 && cx_testing_allocator_data.alloc_total == cx_testing_allocator_data.free_total; 125 && cx_testing_allocator_data.alloc_total == cx_testing_allocator_data.free_total;
126 } 126 }

mercurial