Possible Duplicate:
Can valgrind output partial reports without having to quit the profiled application?
Can we use valgind on an infinite loop?
As valgrind tools display results after the program exits. Is there any tool or a way to get valgrind working on a program with infinite loop.
As an example:
#include<stdio.h>
int main()
{
int i=0;
while(1)
{
int *ptr=malloc(10*sizeof(int));
}
}
how will i check the memory leaks like this?
This program will never end. So can i generate any repot while the program is running?