Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts
Public Types | Public Member Functions | Protected Attributes

itk::SmapsFileParser< TSmapsDataType > Class Template Reference

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>

Inheritance diagram for itk::SmapsFileParser< TSmapsDataType >:
Inheritance graph
[legend]
Collaboration diagram for itk::SmapsFileParser< TSmapsDataType >:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

template<class TSmapsDataType>
class itk::SmapsFileParser< TSmapsDataType >

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.


Member Typedef Documentation

typedef TSmapsDataType ::MemoryLoadType itk::MapFileParser< TSmapsDataType >::MemoryLoadType [inherited]

Definition at line 212 of file itkSmapsFileParser.h.


Constructor & Destructor Documentation

template<class TSmapsDataType >
virtual itk::SmapsFileParser< TSmapsDataType >::~SmapsFileParser (  )  [virtual]

Member Function Documentation

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.

template<class TSmapsDataType >
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 "".


Member Data Documentation

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.


The documentation for this class was generated from the following file:

Generated at Tue Jul 13 2010 02:21:58 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000