Run Time Memory Usage Tool
From ScorecWiki
(Difference between revisions)
Revision as of 02:41, 12 October 2009 Cwsmith (Talk | contribs) ← Previous diff |
Current revision Weisse (Talk | contribs) |
||
Line 23: | Line 23: | ||
(From the webpage http://mail.nl.linux.org/linux-mm/2003-03/msg00077.html) | (From the webpage http://mail.nl.linux.org/linux-mm/2003-03/msg00077.html) | ||
+ | |||
+ | [[Category:Software]] |
Current revision
A tool for determining run time memory usage.
Example Usage:
if( rank == 0 ) { cout<<"["<<P_pid()<<"] Mem. size before partition: "; mem_size=phMemSize(0); cout<<"ps -o vsz: "<<mem_size<<" KB, "; mem_size=phMemSize(1); cout<<"ps -o rss: "<<mem_size<<" KB"<<endl; }
VSIZE (Virtual memory SIZE) - The amount of memory the process is currently using. This includes the amount in RAM and the amount in swap.
RSS (Resident Set Size) - The portion of a process that exists in physical memory (RAM). The rest of the program exists in swap. If the computer has not used swap, this number will be equal to VSIZE.
(From the webpage http://mail.nl.linux.org/linux-mm/2003-03/msg00077.html)