Loading...
Searching...
No Matches
osmium::util::AnonymousMemoryMapping Class Reference

`#include <memory_mapping.hpp>`

Inheritance diagram for osmium::util::AnonymousMemoryMapping:
[legend]
Collaboration diagram for osmium::util::AnonymousMemoryMapping:
[legend]

## Public Member Functions

| AnonymousMemoryMapping (std::size_t size)
Public Member Functions inherited from osmium::util::MemoryMapping
| MemoryMapping (std::size_t size, mapping_mode mode, int fd=-1, off_t offset=0)
| MemoryMapping (const MemoryMapping &)=delete
| You can not copy construct a MemoryMapping.
MemoryMapping & | operator= (const MemoryMapping &)=delete
| You can not copy a MemoryMapping.
| MemoryMapping (MemoryMapping &&other) noexcept
MemoryMapping & | operator= (MemoryMapping &&other) noexcept
| ~MemoryMapping () noexcept
void | unmap ()
void | resize (std::size_t new_size)
| operator bool () const noexcept
std::size_t | size () const noexcept
int | fd () const noexcept
bool | writable () const noexcept
template<typename T = void>
T * | get_addr () const noexcept

## Additional Inherited Members

Public Types inherited from osmium::util::MemoryMapping
enum class | mapping_mode { readonly = 0 , write_private = 1 , write_shared = 2 }

## Detailed Description

Anonymous memory mapping.

Usage for anonymous mapping:

AnonymousMemoryMapping mapping{1024}; // create anonymous mapping with size
auto ptr = mapping.get_addr<char*>(); // get pointer to memory
mapping.unmap(); // release mapping by calling unmap() (or at end of scope)
osmium::util::AnonymousMemoryMapping
Definition memory_mapping.hpp:312
osmium::util::MemoryMapping::get_addr
T * get_addr() const noexcept
Definition memory_mapping.hpp:296

## Constructor & Destructor Documentation

## AnonymousMemoryMapping()

osmium::util::AnonymousMemoryMapping::AnonymousMemoryMapping | ( | std::size_t | size | ) |

inline explicit

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

- include/osmium/util/memory_mapping.hpp