|
From: Brenda B. <bj...@mo...> - 2018-06-12 21:01:06
|
#include <valgrind/memcheck.h>
...
printf("Checking mem leak summary\n");
VALGRIND_DO_QUICK_LEAK_CHECK;
...
printf("Checking mem leak details\n");
VALGRIND_DO_LEAK_CHECK;
...
Call VALGRIND_DO_LEAK_CHECK before your "function of interest", then
call your function, then call VALGRIND_DO_LEAK_CHECK after your
"function of interest". If the output is different the second time
from the first time, you had leaks.
bjb
On Tue, Jun 12, 2018 at 1:03 PM, Ransara Wijethunga <ran...@gm...> wrote:
> Hi John,
>
> Thank you very much for the details. Require one more clarification.
>
> Referring to "Re-direct valgrind's error stream into a file, or use the XML
> error log ........."
> Yes, I'm using XML mode output and I check results using Valkyrie.
>
> Is there any way that I can FLUSH valgrind output ? or configure it to flush
> results to file real time ?
> Asking because , in XML mode ( I have not observed in text output mode )
> valgrind output is NOT completely written until the process is terminated.
> Only when the terminate signal comes, the full output is suddenly written.
>
> Thank you,
> Ransara
>
>
|