libosmscout
0.1
|
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 | |
MemoryMonitor & | operator= (const MemoryMonitor &other)=delete |
MemoryMonitor & | operator= (MemoryMonitor &&other)=delete |
void | Reset () |
Resets the internal values to 0.0. More... | |
~MemoryMonitor () | |
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.
osmscout::MemoryMonitor::MemoryMonitor | ( | ) |
|
delete |
|
delete |
osmscout::MemoryMonitor::~MemoryMonitor | ( | ) |
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.
|
delete |
|
delete |
void osmscout::MemoryMonitor::Reset | ( | ) |
Resets the internal values to 0.0.