| 129 | } |
| 130 | |
| 131 | static void memCleanModule(ACL_ALLOCATOR *allocator) |
| 132 | { |
| 133 | int dirty_count = 0; |
| 134 | ACL_ITER iter; |
| 135 | |
| 136 | acl_foreach_reverse(iter, allocator->pools) { |
| 137 | ACL_MEM_POOL *pool = (ACL_MEM_POOL*) iter.data; |
| 138 | if (!pool) |
| 139 | continue; |
| 140 | if (memPoolInUseCount(pool)) { |
| 141 | memPoolDescribe(pool); |
| 142 | dirty_count++; |
| 143 | } else { |
| 144 | allocator->pool_destroy_fn(pool); |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | if (dirty_count) |
| 149 | acl_msg_warn("memCleanModule: %d pools are left dirty", |
| 150 | dirty_count); |
| 151 | |
| 152 | /* we clean the stack anyway */ |
| 153 | |
| 154 | acl_stack_clean(allocator->pools, NULL); |
| 155 | } |
| 156 | |
| 157 | /* Initialization */ |
| 158 |
nothing calls this directly
no test coverage detected
searching dependent graphs…