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

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | List of all members
Ase::Loft::LoftBuckets Struct Reference

Public Member Functions

 LoftBuckets (BumpAllocator &bumpallocator)
 
LoftPtr< void > do_alloc (size_t size, size_t align)
 
void do_free (void *mem, size_t size)
 
size_t count (unsigned bucket_index, const ArenaList &arenas)
 

Public Attributes

BumpAllocatorbump_allocator
 

Detailed Description

Lock-free, obstruction-free, non-coalescing, alloc-only bucket allocator

Loft is a simple lock-free bucket allocator that maintains free-lists without coalescing blocks or releasing memory back to the underlying bump allocator. The free-list buckets are 64 bytes apart and all allocations are 64 byte aligned to avoid false sharing of cache lines. Allocation requests are satisfied with O(1) complexity using lock-free code paths. Because memory is not released back, no block coalescing (or splitting) is implemented.

Definition at line 296 of file loft.cc.

Constructor & Destructor Documentation

◆ LoftBuckets()

Ase::Loft::LoftBuckets::LoftBuckets ( BumpAllocator bumpallocator)
explicit

Definition at line 297 of file loft.cc.

Member Function Documentation

◆ count()

size_t Ase::Loft::LoftBuckets::count ( unsigned  bucket_index,
const ArenaList arenas 
)

Definition at line 371 of file loft.cc.

◆ do_alloc()

LoftPtr< void > Ase::Loft::LoftBuckets::do_alloc ( size_t  size,
size_t  align 
)

Definition at line 317 of file loft.cc.

◆ do_free()

void Ase::Loft::LoftBuckets::do_free ( void *  mem,
size_t  size 
)

Definition at line 337 of file loft.cc.

Member Data Documentation

◆ bump_allocator

BumpAllocator& Ase::Loft::LoftBuckets::bump_allocator

Definition at line 313 of file loft.cc.


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