osmium::MemoryUsage Class Reference

`#include <memory.hpp>`

## Public Member Functions

| MemoryUsage ()
int | current () const
| Return current memory usage in MBytes. More...
int | peak () const
| Return peak memory usage in MBytes. More...

## Private Member Functions

int | parse_number (const std::string &line)

## Private Attributes

int | m_current = 0
int | m_peak = 0

## Constructor & Destructor Documentation

osmium::MemoryUsage::MemoryUsage | ( |  | ) |

inline

Get the memory usage for the current process. The constructor will get the memory usage. Use the current() and peak() calls to access the result.

This will only work on Linux, on other architectures this will always return 0.

## Member Function Documentation

int osmium::MemoryUsage::current | ( |  | ) | const

inline

Return current memory usage in MBytes.

int osmium::MemoryUsage::parse_number | ( | const std::string & | line | ) |

inline private

int osmium::MemoryUsage::peak | ( |  | ) | const

inline

Return peak memory usage in MBytes.

## Member Data Documentation

int osmium::MemoryUsage::m_current = 0

private

int osmium::MemoryUsage::m_peak = 0

private

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

- osmium/util/memory.hpp