1

I am working on a very wierd Memory leak issue and this resulted into the following problem. I have a process running on my system which increases its Virtual Memory size after a certain operation is made.Now in order to confirm the issue is not a memory leak issue I want to get statistics for the number of free and used pages held by the process when its currently running. I am aware of vmstat command which gives the same statistics for the entire system.But for my confirmation I need a per process vmstat command. Does anyone have a idea how this can be done ?

nobody
  • 19,814
  • 17
  • 56
  • 77

2 Answers2

3

/proc/PID/smaps file will give you exhaustive information on all regions of virtual memory held by the given process.

apangin
  • 92,924
  • 10
  • 193
  • 247
1

If you're coding in C/C++, dynamic analysis tool like Valgrind could be useful. http://valgrind.org/

Alireza
  • 166
  • 7