Anklang C++ API 0.0.0
Loading...
Searching...
No Matches
Arena

#include "memory.hh"

Inheritance diagram for Arena:
[legend]

Public Member Functions

size_talignment () const
Blockallocate (uint32 length) const
Blockallocate (uint32 length, std::nothrow_t) const
Arena (uint32 mem_size, uint32 alignment=cache_line_size)
uint64location () const
voidrelease (Block allocatedblock) const
uint64reserved () const

Protected Member Functions

Arena (AllocatorP)

Protected Attributes

AllocatorPfma

Detailed Description

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

Constructor & Destructor Documentation

Arena() [1/2]

Arena ( uint32 mem_size,
uint32 alignment = cache_line_size
)
explicit

Create isolated memory area.

Arena() [2/2]

Arena ( AllocatorP xfma)
explicitprotected

Member Function Documentation

alignment()

size_t alignment ( ) const

Alignment for block addresses and length.

location()

uint64 location ( ) const

Address of memory area.

reserved()

uint64 reserved ( ) const

Reserved memory area in bytes.

allocate() [1/2]

Block allocate ( uint32 length) const

Create a memory block from cache-line aligned memory area, MT-Unsafe.

allocate() [2/2]

Block allocate ( uint32 length,
std::nothrow_t
) const

release()

void release ( Block allocatedblock) const

Realease a previously allocated block, MT-Unsafe.

Member Data Documentation

fma

AllocatorP fma
protected

Identifier for the associated memory allocator.