#include <source/toolbox/memory/MemoryUtilities.h>
Static Public Member Functions | |
static void | printMemoryInfo (std::ostream &os) |
static void | recordMemoryInfo (double time=0.0) |
static void | printMaxMemory (std::ostream &os) |
Calls to these methods may be placed at various points in an application to track memory usage characteristics. For applications running on a single processor, the call the print method is likely sufficient. The information can simply be printed to a log file or output stream. For applications running on multiple processors, or which otherwise have complex memory patterns that cannot easily be deciphered from prints to a log file, the record method may be more useful. Use of this method requires the TAU (Tuning and Analysis Utilities) package to keep a profile of the recorded memory information so that it can be analyzed via a post-processing tool.
Note that all member functions of this class are static so it is not necessary to instantiate the class. Simply call the functions as static functions; e.g.,MemoryUtilities::function(...).
void SAMRAI::tbox::MemoryUtilities::printMemoryInfo | ( | std::ostream & | os | ) | [static] |
Print memory information to the supplied output stream.
void SAMRAI::tbox::MemoryUtilities::recordMemoryInfo | ( | double | time = 0.0 |
) | [static] |
void SAMRAI::tbox::MemoryUtilities::printMaxMemory | ( | std::ostream & | os | ) | [static] |
Print maximum memory used (i.e. high-water mark) to the supplied output stream.