Loading...
Searching...
No Matches
osmium::MemoryUsage Class Reference

`#include <memory.hpp>`

## Public Member Functions

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

## Static Private Member Functions

static int64_t | parse_number (const std::string &line)

## Private Attributes

int64_t | m_current = 0
int64_t | m_peak = 0

## Constructor & Destructor Documentation

## MemoryUsage()

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

## current()

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

inline

Return current memory usage in MBytes.

## parse_number()

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

inline static private

## peak()

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

inline

Return peak memory usage in MBytes.

## Member Data Documentation

## m_current

int64_t osmium::MemoryUsage::m_current = 0

private

## m_peak

int64_t osmium::MemoryUsage::m_peak = 0

private

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

- include/osmium/util/memory.hpp