libosmscout  0.1
osmscout::MemoryMonitor Class Referencefinal

Starts a background thread that checks every 200ms the current memory usage of the current process and accumulates it to return the maximum memory usage since start or reset. More...

#include <MemoryMonitor.h>

Public Member Functions

void GetMaxValue (double &vmUsage, double &residentSet)
 Return the maximum measured memory usage. More...
 
 MemoryMonitor ()
 
 MemoryMonitor (const MemoryMonitor &other)=delete
 
 MemoryMonitor (MemoryMonitor &&other)=delete
 
MemoryMonitoroperator= (const MemoryMonitor &other)=delete
 
MemoryMonitoroperator= (MemoryMonitor &&other)=delete
 
void Reset ()
 Resets the internal values to 0.0. More...
 
 ~MemoryMonitor ()
 

Detailed Description

Starts a background thread that checks every 200ms the current memory usage of the current process and accumulates it to return the maximum memory usage since start or reset.

Thread is started on construction and join again on destruction (with up to 200ms wait time).

Implementation is OS specific, if GetValue() returns 0.0 for each value there is likely no implementation for your OS.

Constructor & Destructor Documentation

◆ MemoryMonitor() [1/3]

osmscout::MemoryMonitor::MemoryMonitor ( )

◆ MemoryMonitor() [2/3]

osmscout::MemoryMonitor::MemoryMonitor ( const MemoryMonitor other)
delete

◆ MemoryMonitor() [3/3]

osmscout::MemoryMonitor::MemoryMonitor ( MemoryMonitor &&  other)
delete

◆ ~MemoryMonitor()

osmscout::MemoryMonitor::~MemoryMonitor ( )

Member Function Documentation

◆ GetMaxValue()

void osmscout::MemoryMonitor::GetMaxValue ( double &  vmUsage,
double &  residentSet 
)

Return the maximum measured memory usage.

If there is no implementation for your OS, both values return are 0.0.

◆ operator=() [1/2]

MemoryMonitor& osmscout::MemoryMonitor::operator= ( const MemoryMonitor other)
delete

◆ operator=() [2/2]

MemoryMonitor& osmscout::MemoryMonitor::operator= ( MemoryMonitor &&  other)
delete

◆ Reset()

void osmscout::MemoryMonitor::Reset ( )

Resets the internal values to 0.0.


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