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 ()
  More...
 
 pointer_pool_array (const pointer_pool_array &)=delete
 
pointer_pool_arrayoperator= (const pointer_pool_array &)=delete
 
 ~pointer_pool_array ()
  More...
 
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...
 
unsigned size () const BMNOEXCEPT
 return stack size More...
 

Detailed Description

Pool of pointers to buffer cyclic allocations.

Definition at line 155 of file bmalloc.h.

Member Enumeration Documentation

◆ params

Enumerator
n_pool_max_size 

Definition at line 158 of file bmalloc.h.

Member Function Documentation

◆ pop()

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

Get a pointer if there are any vacant.

Definition at line 190 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 180 of file bmalloc.h.

References n_pool_max_size.

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

◆ size()

unsigned bm::pointer_pool_array::size ( ) const
inline

return stack size

Definition at line 199 of file bmalloc.h.

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


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