Skip to content

Struct Ase::Loft::LoftBuckets

ClassList > Ase > Loft > LoftBuckets

More...

Public Attributes

Type Name
BumpAllocator & bump_allocator

Public Functions

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

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.

Public Attributes Documentation

variable bump_allocator

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

Public Functions Documentation

function LoftBuckets

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

function count

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

function do_alloc

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

function do_free

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


The documentation for this class was generated from the following file /__w/anklang/anklang/ase/loft.cc