17 #ifndef IOX_POSH_ROUDI_MEMORY_GENERIC_MEMORY_BLOCK_HPP
18 #define IOX_POSH_ROUDI_MEMORY_GENERIC_MEMORY_BLOCK_HPP
20 #include "iceoryx_posh/roudi/memory/memory_block.hpp"
22 #include "iceoryx_hoofs/cxx/optional.hpp"
47 uint64_t
size() const noexcept override;
57 template <typename... Targs>
58 cxx::optional<T*>
emplace(Targs&&... args) noexcept;
62 cxx::optional<T*>
value() const noexcept;
76 #include "iceoryx_posh/internal/roudi/memory/generic_memory_block.inl"
The GenericMemoryBlock is an implementation of a MemoryBlock for a common use case.
Definition: generic_memory_block.hpp:33
uint64_t size() const noexcept override
This function provides the size of the required memory for the underlying data. It is needed for the ...
uint64_t alignment() const noexcept override
This function provides the alignment of the memory for the underlying data. This information is neede...
cxx::optional< T * > value() const noexcept
This function enables the access to the underlying type.
cxx::optional< T * > emplace(Targs &&... args) noexcept
A new element is constructed by forwarding the arguments to the constructor of T. If the MemoryBlock ...
void destroy() noexcept override
The MemoryProvider calls this either when MemoryProvider::destroy is called or in its destructor.
The MemoryBlock is a container for general purpose memory. It is used to request some memory from a M...
Definition: memory_block.hpp:34
This class creates memory which is requested by the MemoryBlocks. Once the memory is available,...
Definition: memory_provider.hpp:69