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

Function acl_debug_free

lib_acl/src/stdlib/debug/acl_debug_malloc.c:180–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180static void acl_debug_free(const char *filename, int line, void *ptr)
181{
182 char key[256], *value;
183
184 if (ptr == NULL)
185 return;
186 ASSERT(__debug_mem);
187
188 snprintf(key, sizeof(key), "0x%p", ptr);
189
190 LOCK;
191 value = (char*) debug_htable_find(__debug_mem->table, key);
192 if (value == NULL) {
193 fprintf(__debug_mem->dump_fp, "corrupt%c%s%c%d\n", SEP, filename, SEP, line);
194 } else {
195 debug_htable_delete(__debug_mem->table, key, NULL);
196 free(value);
197 free(ptr);
198 }
199 UNLOCK;
200}
201
202static void walk_fn(DEBUG_HTABLE_INFO *info, char *arg acl_unused)
203{

Callers

nothing calls this directly

Calls 3

debug_htable_findFunction · 0.85
debug_htable_deleteFunction · 0.85
freeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…