Run Time Memory Usage Tool

From ScorecWiki

Revision as of 18:26, 18 August 2010; view current revision
←Older revision | Newer revision→
Jump to: navigation, search

A tool for determining run time memory usage.


Example Usage:

 if( rank == 0 ) {
    cout<<"["<<P_pid()<<"] Mem. size before partition: ";
    cout<<"ps -o vsz: "<<mem_size<<" KB, ";
    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

Personal tools