iceoryx_doc  1.0.1
Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
iox::posix::Allocator Class Reference

Public Member Functions

 Allocator (void *const startAddress, const uint64_t length) noexcept
 A bump allocator for the memory provided in the ctor arguments. More...
 
 Allocator (const Allocator &)=delete
 
 Allocator (Allocator &&) noexcept=default
 
Allocatoroperator= (const Allocator &) noexcept=delete
 
Allocatoroperator= (Allocator &&)=default
 
void * allocate (const uint64_t size, const uint64_t alignment) noexcept
 allocates on the memory supplied with the ctor More...
 

Static Public Attributes

static constexpr uint64_t MEMORY_ALIGNMENT = 8U
 

Protected Member Functions

void finalizeAllocation () noexcept
 

Friends

class SharedMemoryObject
 

Constructor & Destructor Documentation

◆ Allocator()

iox::posix::Allocator::Allocator ( void *const  startAddress,
const uint64_t  length 
)
noexcept

A bump allocator for the memory provided in the ctor arguments.

Parameters
[in]startAddressof the memory this allocator manages
[in]lengthof the memory this allocator manages

Member Function Documentation

◆ allocate()

void* iox::posix::Allocator::allocate ( const uint64_t  size,
const uint64_t  alignment 
)
noexcept

allocates on the memory supplied with the ctor

Parameters
[in]sizeof the memory to allocate
[in]alignmentof the memory to allocate
Note
terminates if out of memory of finalizeAllocation was called before

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