The MemoryBlock is a container for general purpose memory. It is used to request some memory from a MemoryProvider, which can be POSIX SHM, the stack or something completely different. To be able to use the container, some functions need to be implemented. For most use cases the GenericMemoryBlock can be used, which is a templated class and implements the most common case.
More...
#include <memory_block.hpp>
The MemoryBlock is a container for general purpose memory. It is used to request some memory from a MemoryProvider, which can be POSIX SHM, the stack or something completely different. To be able to use the container, some functions need to be implemented. For most use cases the GenericMemoryBlock can be used, which is a templated class and implements the most common case.
◆ MemoryBlock()
iox::roudi::MemoryBlock::MemoryBlock |
( |
const MemoryBlock & |
| ) |
|
|
delete |
- Note
- this is intentional not movable/copyable, since a pointer to the memory block is registered at a MemoryProvider and therefore an instance of a MemoryBlock must be pinned to memory
◆ alignment()
virtual uint64_t iox::roudi::MemoryBlock::alignment |
( |
| ) |
const |
|
pure virtualnoexcept |
◆ destroy()
virtual void iox::roudi::MemoryBlock::destroy |
( |
| ) |
|
|
pure virtualnoexcept |
◆ memory()
cxx::optional<void*> iox::roudi::MemoryBlock::memory |
( |
| ) |
const |
|
noexcept |
This function provides the pointer to the requested memory.
- Returns
- an optional pointer to a memory block with the requested size and alignment if the memory is available, otherwise a cxx::nullopt_t
◆ memoryAvailable()
virtual void iox::roudi::MemoryBlock::memoryAvailable |
( |
void * |
memory | ) |
|
|
virtualnoexcept |
◆ size()
virtual uint64_t iox::roudi::MemoryBlock::size |
( |
| ) |
const |
|
pure virtualnoexcept |
The documentation for this class was generated from the following file: