STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Static Public Member Functions
stapl::runtime::memory_allocator Class Reference

Provides interfaces to do pool allocation for objects. More...

Static Public Member Functions

static void initialize (option const &opts)
 Initializes the memory_allocator. More...
 
static void finalize (void)
 Finalizes the memory_allocator. More...
 
static void * allocate (std::size_t)
 Allocates the requested number of bytes. More...
 
static void deallocate (void *, std::size_t) noexcept
 Returns the allocated storage. More...
 

Detailed Description

Provides interfaces to do pool allocation for objects.

The allocation and deallocation are not thread-safe, but they are thread-local.

Member Function Documentation

◆ initialize()

void stapl::runtime::memory_allocator::initialize ( option const &  opts)
static

Initializes the memory_allocator.

Parameters
optsoption object to initialize the memory allocator with.

◆ finalize()

void stapl::runtime::memory_allocator::finalize ( void  )
static

Finalizes the memory_allocator.

It will print allocation information if STAPL_ENABLE_MANAGED_ALLOC_STATISTICS is set.

◆ allocate()

void * stapl::runtime::memory_allocator::allocate ( std::size_t  size)
static

Allocates the requested number of bytes.

It will keep track of the allocations if STAPL_ENABLE_MANAGED_ALLOC_STATISTICS is set.

◆ deallocate()

void stapl::runtime::memory_allocator::deallocate ( void *  p,
std::size_t  size 
)
staticnoexcept

Returns the allocated storage.

It will keep track of the allocations if STAPL_ENABLE_MANAGED_ALLOC_STATISTICS is set.


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