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

Public Member Functions

void *bump_alloc (size_t size)
size_tfree_block () const
size_tgrow_spans (size_t needed, bool preallocating)
voidlist_arenas (ArenaList &arenas)
size_ttotalmem () const

Detailed Description

BumpAllocator - satisfy allocations by bumping an offset into mmap based spans. This allocator satisfies allocation requests from pre-allocated mmap regions. The regions support transparent huge pages and are setup to allow upwards growth instead of accumulating a long list of individual mappings. As long as enough pre-allocated memory is available, allocation requests are served via a single lock-free offset increment. Atm, no memory is released back to the OS ever.

Member Function Documentation

bump_alloc()

void * bump_alloc ( size_t size)

grow_spans()

size_t grow_spans ( size_t needed,
bool preallocating
)

free_block()

size_t free_block ( ) const

list_arenas()

void list_arenas ( ArenaList & arenas)

totalmem()

size_t totalmem ( ) const