Skip to content

iox::posix::Allocator🔗

Public Functions🔗

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

Protected Functions🔗

Name
void finalizeAllocation()

Public Attributes🔗

Name
constexpr uint64_t MEMORY_ALIGNMENT

Friends🔗

Name
class SharedMemoryObject

Public Functions Documentation🔗

function Allocator🔗

Allocator(
    void *const startAddress,
    const uint64_t length
)

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

Parameters:

  • startAddress of the memory this allocator manages
  • length of the memory this allocator manages

function Allocator🔗

Allocator(
    const Allocator & 
)

function Allocator🔗

Allocator(
    Allocator && 
) =default

function operator=🔗

Allocator & operator=(
    const Allocator & 
)

function operator=🔗

Allocator & operator=(
    Allocator && 
) =default

function ~Allocator🔗

~Allocator() =default

function allocate🔗

void * allocate(
    const uint64_t size,
    const uint64_t alignment
)

allocates on the memory supplied with the ctor

Parameters:

  • size of the memory to allocate
  • alignment of the memory to allocate

Note: terminates if out of memory of finalizeAllocation was called before

Protected Functions Documentation🔗

function finalizeAllocation🔗

void finalizeAllocation()

Public Attributes Documentation🔗

variable MEMORY_ALIGNMENT🔗

static constexpr uint64_t MEMORY_ALIGNMENT = 8U;

Friends🔗

friend SharedMemoryObject🔗

friend class SharedMemoryObject;

Updated on 26 April 2021 at 15:31:01 CEST