Read a smap file (typically located in /proc/PID/smaps) and extract the memory usage information. Any smaps data reader can be used in template as long as they implement a operator>>(istream&) and have GetXXXUsage() methods. More...
#include <itkSmapsFileParser.h>
Public Types | |
typedef TSmapsDataType::MemoryLoadType | MemoryLoadType |
Public Member Functions | |
MemoryLoadType | GetHeapUsage () |
MemoryLoadType | GetMemoryUsage (const char *filter, const char *token="Size") |
MemoryLoadType | GetStackUsage () |
MemoryLoadType | GetTotalMemoryUsage () |
virtual void | ReadFile (const std::string &mapFileLocation="") |
bool | Update (void) |
virtual | ~SmapsFileParser () |
Protected Attributes | |
TSmapsDataType | m_MapData |
std::string | m_MapFilePath |
Read a smap file (typically located in /proc/PID/smaps) and extract the memory usage information. Any smaps data reader can be used in template as long as they implement a operator>>(istream&) and have GetXXXUsage() methods.
Definition at line 257 of file itkSmapsFileParser.h.
typedef TSmapsDataType ::MemoryLoadType itk::MapFileParser< TSmapsDataType >::MemoryLoadType [inherited] |
Definition at line 212 of file itkSmapsFileParser.h.
virtual itk::SmapsFileParser< TSmapsDataType >::~SmapsFileParser | ( | ) | [virtual] |
MemoryLoadType itk::MapFileParser< TSmapsDataType >::GetHeapUsage | ( | ) | [inherited] |
Returns the heap usage in kB of the process. If no file has been loaded yet, load a default file.
MemoryLoadType itk::MapFileParser< TSmapsDataType >::GetMemoryUsage | ( | const char * | filter, | |
const char * | token = "Size" | |||
) | [inherited] |
Returns the memory usage in kB of a process segment. If no file has been loaded yet, load a default file.
MemoryLoadType itk::MapFileParser< TSmapsDataType >::GetStackUsage | ( | ) | [inherited] |
Returns the heap usage in kB of the process. If no file has been loaded yet, load a default file.
MemoryLoadType itk::MapFileParser< TSmapsDataType >::GetTotalMemoryUsage | ( | ) | [inherited] |
Returns the total memory usage in kB of a process. If no file has been loaded yet, load a default file.
virtual void itk::SmapsFileParser< TSmapsDataType >::ReadFile | ( | const std::string & | mapFileLocation = "" |
) | [virtual] |
Load and parse the smaps file pointed by smapsFileLocation. If smapsFileLocation is empty, load the file located at "/proc/" + PID + "/smaps" Throw an exception is the file can't be opened.
Implements itk::MapFileParser< TSmapsDataType >.
bool itk::MapFileParser< TSmapsDataType >::Update | ( | void | ) | [inherited] |
ReRead the last parsed file to refresh the memory usage. Returns true if read from the default location "".
TSmapsDataType itk::MapFileParser< TSmapsDataType >::m_MapData [protected, inherited] |
Definition at line 248 of file itkSmapsFileParser.h.
std::string itk::MapFileParser< TSmapsDataType >::m_MapFilePath [protected, inherited] |
Definition at line 247 of file itkSmapsFileParser.h.