Quick Links:

bal | bbl | bdl | bsl

Public Types | Static Public Member Functions

bdlcc::SkipList_PoolUtil Struct Reference

#include <bdlcc_skiplist.h>

List of all members.

Public Types

typedef SkipList_PoolManager PoolManager

Static Public Member Functions

static void * allocate (PoolManager *poolManager, int level)
static PoolManagercreatePoolManager (int *objectSizes, int numLevels, bslma::Allocator *basicAllocator)
static void deallocate (PoolManager *poolManager, void *address)
static void deletePoolManager (bslma::Allocator *basicAllocator, PoolManager *poolManager)

Detailed Description

This component-private utility handles the lock-free pool of list nodes.

See Component bdlcc_skiplist


Member Typedef Documentation

typedef SkipList_PoolManager bdlcc::SkipList_PoolUtil::PoolManager

Member Function Documentation

static void* bdlcc::SkipList_PoolUtil::allocate ( PoolManager poolManager,
int  level 
) [static]

Reserve sufficient space for a node at the specified level from the specified poolManager, and return the address of the reserved memory.

static PoolManager* bdlcc::SkipList_PoolUtil::createPoolManager ( int *  objectSizes,
int  numLevels,
bslma::Allocator basicAllocator 
) [static]

Create a new pooled node allocator that manages nodes up to the specified numLevels as described by the specified objectSizes. For i in [0, numLevels), a node at level i will have size objectSizes[i] bytes. Use the specified basicAllocator to supply memory. Return the address of the new allocator. Note that the behavior is undefined if basicAllocator is 0.

static void bdlcc::SkipList_PoolUtil::deallocate ( PoolManager poolManager,
void *  address 
) [static]

Return the node at the specified address to the specified poolManager. The behavior is undefined if address was not allocated from poolManager.

static void bdlcc::SkipList_PoolUtil::deletePoolManager ( bslma::Allocator basicAllocator,
PoolManager poolManager 
) [static]

Destroy the specified poolManager which was allocated from the specified basicAllocator. The behavior is undefined if poolManager was not allocated from basicAllocator.


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