From: Nicholas N. <n.n...@gm...> - 2009-05-08 06:10:13
|
On Fri, May 8, 2009 at 3:06 PM, Theodoros V. Kalamatianos <th...@gm...> wrote: >> >> In general, what you are proposing is possible, but it's not easy, is >> really slow and would be lots of extra code in Memcheck. > > What if it was done in two passes? Run memcheck normally, and then re-run > valgrind repeatedly in order to track a specific memory leak each time. You > could say e.g. --tool=analyse-leak --with-alloc=foo.c:111 and have valgrind > track those pointers only. Could we exploit that to make things easier > speed-wise and coding-wise? Two passes introduces problems of its own -- it's great if you have a totally deterministic program, otherwise you're in trouble. Or you can use deterministic replay techniques but that's more complication. > IMO when you _know_ you have a problem, a slower but effective valgrind is > definitely acceptable. Of course. My broader point is that there's an enormous difference between proposing something and implementing it, especially when the proposal is ambitious. Nick |