BitMagic-C++
Public Types | Public Member Functions
bm::pointer_pool_array Class Reference

Pool of pointers to buffer cyclic allocations. More...

#include <bmalloc.h>

Public Types

enum  params { n_pool_max_size = BM_DEFAULT_POOL_SIZE }
 

Public Member Functions

 pointer_pool_array ()
 
 pointer_pool_array (const pointer_pool_array &)=delete
 
pointer_pool_arrayoperator= (const pointer_pool_array &)=delete
 
 ~pointer_pool_array ()
 
unsigned push (void *ptr) BMNOEXCEPT
 Push pointer to the pool (if it is not full) More...
 
void * pop () BMNOEXCEPT
 Get a pointer if there are any vacant. More...
 

Detailed Description

Pool of pointers to buffer cyclic allocations.

Definition at line 137 of file bmalloc.h.

Member Enumeration Documentation

◆ params

Enumerator
n_pool_max_size 

Definition at line 140 of file bmalloc.h.

Constructor & Destructor Documentation

◆ pointer_pool_array() [1/2]

bm::pointer_pool_array::pointer_pool_array ( )
inline

Definition at line 145 of file bmalloc.h.

References n_pool_max_size.

◆ pointer_pool_array() [2/2]

bm::pointer_pool_array::pointer_pool_array ( const pointer_pool_array )
delete

◆ ~pointer_pool_array()

bm::pointer_pool_array::~pointer_pool_array ( )
inline

Definition at line 153 of file bmalloc.h.

References BM_ASSERT.

Member Function Documentation

◆ operator=()

pointer_pool_array& bm::pointer_pool_array::operator= ( const pointer_pool_array )
delete

◆ pop()

void* bm::pointer_pool_array::pop ( )
inline

Get a pointer if there are any vacant.

Definition at line 172 of file bmalloc.h.

Referenced by bm::alloc_pool< BA, PA >::alloc_bit_block(), and bm::alloc_pool< BA, PA >::free_pools().

◆ push()

unsigned bm::pointer_pool_array::push ( void *  ptr)
inline

Push pointer to the pool (if it is not full)

Returns
0 if pointer is not accepted (pool is full)

Definition at line 162 of file bmalloc.h.

References n_pool_max_size.

Referenced by bm::alloc_pool< BA, PA >::free_bit_block().


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