libosmscout  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
osmscout::MemoryMonitor Class Reference

Starts a background threads 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 ()
 
void Reset ()
 Resets the internal values to 0.0. More...
 
 ~MemoryMonitor ()
 

Detailed Description

Starts a background threads 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() retutns 0.0 for each value there is likely no implementation for your OS.

Constructor & Destructor Documentation

osmscout::MemoryMonitor::MemoryMonitor ( )
osmscout::MemoryMonitor::~MemoryMonitor ( )

Member Function Documentation

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.

void osmscout::MemoryMonitor::Reset ( )

Resets the internal values to 0.0.


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