|
From: Nicholas N. <n.n...@gm...> - 2009-08-16 22:27:33
|
On Sun, Aug 16, 2009 at 10:49 PM, Rachel and Stuart<rac...@ra...> wrote: > For regular memory allocation we get to use |VALGRIND_DO_LEAK_CHECK. > There's no equivalent function for mempools. | It seems natural that if > there's an interface for tracking 'memory pools' with Valgrind, there > should be a way of reporting their leaks.|| VALGRIND_DO_LEAK_CHECK and --leak-check both look for leaks in all current memory pools. I don't know why you think this is not the case. memcheck/tests/mempool.c makes it clear -- for example, x1 and x2 are leaked. But, as you've been told, if you destroy a mempool all the chunks within it are freed, and so there can be no leaks from that mempool. That's why x3 and x4 aren't reported as leaked, because they've been freed. I think you should read the documentation again and try writing some small test programs to improve your understanding. NIck |