On 1/22/21 9:31 PM, Kunal Chauhan wrote:
Hi Team,
As on my linux board ,one of process showing some run time memory
increase as seen by pmap command.
So how valgrind can be useful to search such mem leaks in big code.
Or is there is way to attached valgrind and see where and which
instruction actually causing issue
Hi
You can't 'attach' Valgrind to a running process.
What you need to do is to run the process under Valgrind. If the process
normally runs to completion, you can just run it under Valgrind (by
default, the memcheck tool will be used, add --leak-check=full and
possibly --show-reachable=yes).
If the process is running aas a daemon, then your best bet is to run it
under Valgrind and then attach gdb to it and use monitor commands to
check for leaks. That is documented on the Valgrind web page, here
https://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.gdbserver-commandhandling
.
A+
Paul
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users