Page 1 of 1

Memory Usage

Posted: Mon Mar 28, 2005 10:49 am
by shamim
How to find out how much memory a program has used, in linux.

Re: Memory Usage

Posted: Mon Mar 28, 2005 4:29 pm
by Tomislav Novak
shamim wrote:How to find out how much memory a program has used, in linux.
You could read /proc/<pid>/status just before your program terminates (using atexit for example). If anyone knows a better way (the one that judge uses), I would also like to know. :-)

Posted: Tue Mar 29, 2005 2:21 pm
by Tomislav Novak