Class Allocator

Class Documentation

class Allocator

Public Functions

Allocator(void *const startAddress, const uint64_t length) noexcept

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

Parameters:
  • startAddress[in] of the memory this allocator manages

  • length[in] of the memory this allocator manages

Allocator(const Allocator&) = delete
Allocator(Allocator&&) noexcept = default
Allocator &operator=(const Allocator&) noexcept = delete
Allocator &operator=(Allocator&&) noexcept = default
~Allocator() noexcept = default
void *allocate(const uint64_t size, const uint64_t alignment) noexcept

allocates on the memory supplied with the ctor

Note

May terminate if out of memory or finalizeAllocation() was called before

Parameters:
  • size[in] of the memory to allocate

  • alignment[in] of the memory to allocate

Public Static Attributes

static constexpr uint64_t MEMORY_ALIGNMENT = 8U

Protected Functions

void finalizeAllocation() noexcept

Friends

friend class SharedMemoryObject