trying to identify a memory leak in my program. please help me here.
hello all,
Iam trying to identify a memory leak in my program , iam using ps to discover/get confirmation that i do have memory issue in my program . so after regular interval i am issuing ps command and i see that vmsize of my task is getting increased is this correct way of justifying the memory leak issue?
let me give you a design overview of my process.
It has two threads . one thread is a producer of data another thread is consumer of that data.
This data is a list , so thread 1 would first generate the list and then intimate the thread 2 that new list available .
thread 2 would be then using that copy data/ list to local list . this list consist of domain name which needs to be get resolve . thread 2 would resolve the domian name and it compares local list any change with the exisiting global list .
if there is a change it will free the global list and then make local list as global.
Here memory leak is happening only when it is free the existing global list by thread2 .
But the same free routine works for thread1,where i donot see any memory leak .
I could not able to figure out why this is failing when this free routine is getting used by thread2
your help would be highly appreciated.