Open CASCADE Technology  7.0.0
Public Types | Public Member Functions | Static Public Member Functions

OSD_MemInfo Class Reference

This class provide information about memory utilized by current process. This information includes: More...

#include <OSD_MemInfo.hxx>

Public Types

enum  Counter {
  MemPrivate = 0, MemVirtual, MemWorkingSet, MemWorkingSetPeak,
  MemSwapUsage, MemSwapUsagePeak, MemHeapUsage, MemCounter_NB
}
 

Public Member Functions

 OSD_MemInfo ()
 Create and initialize. More...
 
void Update ()
 Update counters. More...
 
TCollection_AsciiString ToString () const
 Return the string representation for all available counter. More...
 
Standard_Size Value (const OSD_MemInfo::Counter theCounter) const
 Return value or specified counter in bytes. Notice that NOT all counters are available on various systems. Standard_Size(-1) means invalid (unavailable) value. More...
 
Standard_Size ValueMiB (const OSD_MemInfo::Counter theCounter) const
 Return value or specified counter in MiB. Notice that NOT all counters are available on various systems. Standard_Size(-1) means invalid (unavailable) value. More...
 

Static Public Member Functions

static TCollection_AsciiString PrintInfo ()
 Return the string representation for all available counter. More...
 

Detailed Description

This class provide information about memory utilized by current process. This information includes:

Notice that none of these counters can be used as absolute measure of application memory consumption!

User should analyze all values in specific case to make correct decision about memory (over)usage. This is also prefferred to use specialized tools to detect memory leaks.

This also means that these values should not be used for intellectual memory management by application itself.

Member Enumeration Documentation

Enumerator
MemPrivate 

Virtual memory allocated for data and stack excluding libraries.

MemVirtual 

Reserved and committed memory of the virtual address space.

MemWorkingSet 

Memory pages that are currently resident in physical memory.

MemWorkingSetPeak 

Peak working set size.

MemSwapUsage 

Space allocated for the pagefile.

MemSwapUsagePeak 

Peak space allocated for the pagefile.

MemHeapUsage 

Total space allocated from the heap.

MemCounter_NB 

Indicates total counters number.

Constructor & Destructor Documentation

OSD_MemInfo::OSD_MemInfo ( )

Create and initialize.

Member Function Documentation

static TCollection_AsciiString OSD_MemInfo::PrintInfo ( )
static

Return the string representation for all available counter.

TCollection_AsciiString OSD_MemInfo::ToString ( ) const

Return the string representation for all available counter.

void OSD_MemInfo::Update ( )

Update counters.

Standard_Size OSD_MemInfo::Value ( const OSD_MemInfo::Counter  theCounter) const

Return value or specified counter in bytes. Notice that NOT all counters are available on various systems. Standard_Size(-1) means invalid (unavailable) value.

Standard_Size OSD_MemInfo::ValueMiB ( const OSD_MemInfo::Counter  theCounter) const

Return value or specified counter in MiB. Notice that NOT all counters are available on various systems. Standard_Size(-1) means invalid (unavailable) value.


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