Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)
« « « Anklang Documentation |
Memory area (over-)aligned to cache size and utilizing huge pages. More...
#include "memory.hh"
Public Member Functions | |
Arena (uint32 mem_size, uint32 alignment=cache_line_size) | |
Create isolated memory area. | |
size_t | alignment () const |
Alignment for block addresses and length. | |
uint64 | location () const |
Address of memory area. | |
uint64 | reserved () const |
Reserved memory area in bytes. | |
Block | allocate (uint32 length) const |
Create a memory block from cache-line aligned memory area, MT-Unsafe. | |
Block | allocate (uint32 length, std::nothrow_t) const |
void | release (Block allocatedblock) const |
Realease a previously allocated block, MT-Unsafe. | |
Protected Member Functions | |
Arena (AllocatorP) | |
Protected Attributes | |
AllocatorP | fma |
Identifier for the associated memory allocator. | |
Memory area (over-)aligned to cache size and utilizing huge pages.
|
explicit |
Create isolated memory area.
Definition at line 331 of file memory.cc.
References alignment(), and assert_return.
|
explicitprotected |
size_t Ase::FastMemory::Arena::alignment | ( | ) | const |
Create a memory block from cache-line aligned memory area, MT-Unsafe.
Definition at line 371 of file memory.cc.
References allocate().
Referenced by allocate().
Block Ase::FastMemory::Arena::allocate | ( | uint32 | length, |
std::nothrow_t | |||
) | const |
uint64 Ase::FastMemory::Arena::location | ( | ) | const |
Address of memory area.
Definition at line 340 of file memory.cc.
References fma.
Referenced by Ase::ServerImpl::broadcast_telemetry().
void Ase::FastMemory::Arena::release | ( | Block | allocatedblock | ) | const |
Realease a previously allocated block, MT-Unsafe.
Definition at line 380 of file memory.cc.
References alignment(), assert_return, and fma.
uint64 Ase::FastMemory::Arena::reserved | ( | ) | const |
|
protected |
Identifier for the associated memory allocator.
Definition at line 116 of file memory.hh.
Referenced by alignment(), location(), release(), and reserved().