BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlcc::SkipList_PoolUtil Struct Reference

#include <bdlcc_skiplist.h>

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)
 

Member Typedef Documentation

◆ PoolManager

typedef SkipList_PoolManager bdlcc::SkipList_PoolUtil::PoolManager

Member Function Documentation

◆ allocate()

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.

◆ createPoolManager()

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.

◆ deallocate()

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.

◆ deletePoolManager()

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: