Since DEBUG_MEM is storing own extra structure within returned memory chunk,
glibc free must be used directly for posix_memaling() allocated block.
Version 1.02.68 -
==================================
+ Fix compile-time pool memory locking with DEBUG_MEM.
Fix valgrind error reports in free of pool chunks with DEBUG_MEM.
Align size of structure chunk for fast pool allocator to 8 bytes.
Simplify some pointer operations in dm_free_aux() debug code.
VALGRIND_MAKE_MEM_UNDEFINED(c + 1, c->end - (char *) (c + 1));
# endif
#endif
+#ifdef DEBUG_ENFORCE_POOL_LOCKING
+ /* since DEBUG_MEM is using own memory list */
+ free(c); /* for posix_memalign() */
+#else
dm_free(c);
+#endif
}