Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Ase::FastMemory::Arena Struct Reference

Memory area (over-)aligned to cache size and utilizing huge pages. More...

#include "memory.hh"

Inheritance diagram for Ase::FastMemory::Arena:
[legend]

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.
 

Detailed Description

Memory area (over-)aligned to cache size and utilizing huge pages.

Definition at line 100 of file memory.hh.

Constructor & Destructor Documentation

◆ Arena() [1/2]

Ase::FastMemory::Arena::Arena ( uint32  mem_size,
uint32  alignment = cache_line_size 
)
explicit

Create isolated memory area.

Definition at line 331 of file memory.cc.

References alignment(), and assert_return.

◆ Arena() [2/2]

Ase::FastMemory::Arena::Arena ( AllocatorP  xfma)
explicitprotected

Definition at line 315 of file memory.cc.

Member Function Documentation

◆ alignment()

size_t Ase::FastMemory::Arena::alignment ( ) const

Alignment for block addresses and length.

Definition at line 352 of file memory.cc.

References fma.

Referenced by Arena(), and release().

◆ allocate() [1/2]

Block Ase::FastMemory::Arena::allocate ( uint32  length) 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().

◆ allocate() [2/2]

Block Ase::FastMemory::Arena::allocate ( uint32  length,
std::nothrow_t   
) const

Definition at line 358 of file memory.cc.

◆ location()

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().

◆ release()

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.

◆ reserved()

uint64 Ase::FastMemory::Arena::reserved ( ) const

Reserved memory area in bytes.

Definition at line 346 of file memory.cc.

References fma.

Member Data Documentation

◆ fma

AllocatorP Ase::FastMemory::Arena::fma
protected

Identifier for the associated memory allocator.

Definition at line 116 of file memory.hh.

Referenced by alignment(), location(), release(), and reserved().


The documentation for this struct was generated from the following files: