Libosmium: osmium::MemoryUsage Class Reference

Libosmium Fast and flexible C++ library for working with OpenStreetMap data

Loading...
Searching...
No Matches
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
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()

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

## ◆ 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