Using VALGRIND_MEMPOOL_CHANGE is prohibitively slow as it (twice) calls check_mempool_sane(). Looking at r15577 of memcheck/mc_malloc_wrappers.c, I suggest adding "if (MP_DETAILED_SANITY_CHECKS" before the two calls to check_mempool_sane() in MC_(mempool_change). This speeds up my application by more than a factor of 10 or so… There are more unconditional calls to check_mempool_sane() in that file; maybe some of them should be reconsidered as well? Reproducible: Always
Do you have a suggested patch that we could look at? That would be helpful.
ping?
ping²?