MCPcopy Create free account
hub / github.com/acl-dev/acl / memCleanModule

Function memCleanModule

lib_acl/src/stdlib/memory/squid_allocator.c:131–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131static 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

Callers

nothing calls this directly

Calls 4

memPoolInUseCountFunction · 0.85
memPoolDescribeFunction · 0.85
acl_msg_warnFunction · 0.85
acl_stack_cleanFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…