A cursory search through the source code indicates that MEMPOOL_ALLOC
calls new_block, which increments cmalloc_n_mallocs, but there is no
corresponding change to cmalloc_n_frees in MEMPOOL_FREE. Here's a
patch that increments it at the very end of MEMPOOL_FREE. This gives
me the behavior I expect.
My usage of VALGRIND_MEMPOOL_FREE doesn't seem to be reflected in the
heap summary on version 3.5.0, though it doesn't complain about leaks.
Is this the expected behavior?
Here is my uname and a program that demonstrates my issue:
http://pastebin.com/yw5m09j6
-