|
From: Tom H. <to...@co...> - 2012-09-14 14:09:19
|
On 14/09/12 14:21, Elia Pinto wrote: > "If you are using valgrind to run tests, is it sane to also enable > MALLOC_CHECK? If you were testing "cat", would it make sense to do: > > $ MALLOC_CHECK_=3 valgrind cat README I think you'll find that the MALLOC_CHECK_ does precisely nothing when you do this because neither valgrind not cat will be using the glibc malloc in any way. Memory allocation for valgrind is done using valgrind's own allocator and when valgrinding a program using the default memcheck tool the normal malloc will be overridden to use valgrind's version so that we can track what blocks are allocated. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |