memory occupied by a program
hi,
I want to find out total memory occupeid by a program at run time. One problem is my program uses dynamic memory allocation at some points of code. Can any body please tell me how to find out actual memory taken by the program. ( I think i cant take the size of .out file) Thanks in advance. Regards, Rajesh |
Did you tried ps -eF <processname>?
|
You can't find out how much memory a program may use if it employs dynamic memory. The whole idea of dynamic memory is that it is not a predetermined amount. There is no way of guessing whether an app will open a 1kb file or a 1gb file.
|
Check out the dmalloc library. It's very simple to use, and provides lots of good info about your dynamic memory usage.
|
All times are GMT -5. The time now is 07:22 AM. |