17#ifndef IOX_POSH_ROUDI_MEMORY_MEMORY_BLOCK_HPP
18#define IOX_POSH_ROUDI_MEMORY_MEMORY_BLOCK_HPP
20#include "iceoryx_hoofs/cxx/helplets.hpp"
21#include "iceoryx_hoofs/cxx/optional.hpp"
35 friend class MemoryProvider;
38 MemoryBlock()
noexcept =
default;
39 virtual ~MemoryBlock()
noexcept =
default;
44 MemoryBlock(MemoryBlock&&) =
delete;
45 MemoryBlock& operator=(
const MemoryBlock&) =
delete;
46 MemoryBlock& operator=(MemoryBlock&&) =
delete;
51 virtual uint64_t
size() const noexcept = 0;
61 cxx::optional<
void*>
memory() const noexcept;
74 void* m_memory{
nullptr};
virtual uint64_t size() const noexcept=0
This function provides the size of the required memory for the underlying data. It is needed for the ...
cxx::optional< void * > memory() const noexcept
This function provides the pointer to the requested memory.
virtual void destroy() noexcept=0
The MemoryProvider calls this either when MemoryProvider::destroy is called or in its destructor.
MemoryBlock(const MemoryBlock &)=delete
virtual uint64_t alignment() const noexcept=0
This function provides the alignment of the memory for the underlying data. This information is neede...
virtual void onMemoryAvailable(cxx::not_null< void * > memory) noexcept
This function is called once the memory is available and is therefore the earliest possibility to use...
Definition iceoryx_posh_types.hpp:217