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 } |