18#ifndef itkSmapsFileParser_h
19#define itkSmapsFileParser_h
50 std::string m_RecordName{};
56 std::map<std::string, MemoryLoadType> m_Tokens{};
83 friend ITKCommon_EXPORT std::istream &
100 friend ITKCommon_EXPORT std::istream &
117 friend ITKCommon_EXPORT std::istream &
190 friend ITKCommon_EXPORT std::istream &
194 bool m_HeapRecordFound{};
221 friend ITKCommon_EXPORT std::istream &
225 bool m_UsingSummary{
false };
235template <
typename TMapData>
247 ReadFile(
const std::string & mapFileLocation =
"") = 0;
280 std::string m_MapFilePath{};
281 TMapData m_MapData{};
290template <
typename TSmapsDataType>
301 ReadFile(
const std::string & mapFileLocation =
"");
309template <
typename TVMMapDataType>
318 ReadFile(
const std::string & mapFileLocation =
"");
322#ifndef ITK_MANUAL_INSTANTIATION
323# include "itkSmapsFileParser.hxx"
Base class for map data containers.
virtual MemoryLoadType GetTotalMemoryUsage()
virtual MemoryLoadType GetStackUsage()=0
virtual MemoryLoadType GetMemoryUsage(const char *filter, const char *token)
virtual MemoryLoadType GetHeapUsage()=0
SizeValueType MemoryLoadType
std::vector< MapRecord * > MapRecordVectorType
virtual ~MapFileParser()=default
typename TMapData::MemoryLoadType MemoryLoadType
MemoryLoadType GetStackUsage()
MemoryLoadType GetTotalMemoryUsage()
virtual void ReadFile(const std::string &mapFileLocation="")=0
MemoryLoadType GetHeapUsage()
MemoryLoadType GetMemoryUsage(const char *filter, const char *token="Size")
SizeValueType MemoryLoadType
Read a smaps stream and return the memory usage information. Smaps files have been added since the li...
~SmapsData_2_6() override
friend ITKCommon_EXPORT std::istream & operator>>(std::istream &smapsStream, SmapsData_2_6 &data)
MemoryLoadType GetHeapUsage() override
MemoryLoadType GetStackUsage() override
Read a smap file (typically located in /proc/PID/smaps) and extract the memory usage information....
virtual ~SmapsFileParser()=default
virtual void ReadFile(const std::string &mapFileLocation="")
An entry in a smaps file.
friend ITKCommon_EXPORT std::istream & operator>>(std::istream &in, SmapsRecord &record)
friend ITKCommon_EXPORT std::istream & operator>>(std::istream &stream, VMMapData_10_2 &data)
MemoryLoadType GetHeapUsage() override
MemoryLoadType GetStackUsage() override
~VMMapData_10_2() override
Read the output of a vmmap command and extract the memory usage information. Used for MAC OS X machin...
virtual ~VMMapFileParser()=default
virtual void ReadFile(const std::string &mapFileLocation="")
Contains an entry in a smaps file.
friend ITKCommon_EXPORT std::istream & operator>>(std::istream &in, VMMapRecord &record)
Contains an entry in a smaps file.
friend ITKCommon_EXPORT std::istream & operator>>(std::istream &in, VMMapSummaryRecord &record)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType