17 #ifndef IOX_UTILS_POSIX_WRAPPER_SHARED_MEMORY_OBJECT_ALLOCATOR_HPP
18 #define IOX_UTILS_POSIX_WRAPPER_SHARED_MEMORY_OBJECT_ALLOCATOR_HPP
25 class SharedMemoryObject;
29 using byte_t = uint8_t;
33 static constexpr uint64_t MEMORY_ALIGNMENT = 8U;
37 Allocator(
void*
const startAddress,
const uint64_t length) noexcept;
49 void*
allocate(const uint64_t size, const uint64_t alignment) noexcept;
53 void finalizeAllocation() noexcept;
56 byte_t* m_startAddress{
nullptr};
57 uint64_t m_length{0u};
58 uint64_t m_currentPosition = 0u;
59 bool m_allocationFinalized =
false;
Definition: allocator.hpp:28
Allocator(void *const startAddress, const uint64_t length) noexcept
A bump allocator for the memory provided in the ctor arguments.
void * allocate(const uint64_t size, const uint64_t alignment) noexcept
allocates on the memory supplied with the ctor
Definition: shared_memory_object.hpp:43
building block to easily create free function for logging in a library context
Definition: lockfree_queue.hpp:28