bm::pointer_pool_array Class Reference
BitMagic Library » bvector<> container » Allocator

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_array & | operator= (const pointer_pool_array &)=delete
| ~pointer_pool_array ()
unsigned | push (void *ptr) BMNOEXCEPT
| Push pointer to the pool (if it is not full).
void * | pop () BMNOEXCEPT
| Get a pointer if there are any vacant.
unsigned | size () const BMNOEXCEPT
| return stack size

## Detailed Description

Pool of pointers to buffer cyclic allocations.

Definition at line 154 of file bmalloc.h.

## Member Enumeration Documentation

## params

enum bm::pointer_pool_array::params

Enumerator
n_pool_max_size |

Definition at line 157 of file bmalloc.h.

## Constructor & Destructor Documentation

## pointer_pool_array() [1/2]

bm::pointer_pool_array::pointer_pool_array | ( |  | ) |

inline

Definition at line 162 of file bmalloc.h.

References n_pool_max_size.

Referenced by operator=(), and pointer_pool_array().

## pointer_pool_array() [2/2]

bm::pointer_pool_array::pointer_pool_array | ( | const pointer_pool_array & |  | ) |

delete

References pointer_pool_array().

## ~pointer_pool_array()

bm::pointer_pool_array::~pointer_pool_array | ( |  | ) |

inline

Definition at line 170 of file bmalloc.h.

References BM_ASSERT.

## Member Function Documentation

## operator=()

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

delete

References pointer_pool_array().

## pop()

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

inline

Get a pointer if there are any vacant.

Definition at line 189 of file bmalloc.h.

References BMNOEXCEPT.

## 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 179 of file bmalloc.h.

References BMNOEXCEPT, and n_pool_max_size.

## size()

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

inline

return stack size

Definition at line 198 of file bmalloc.h.

References BMNOEXCEPT.

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

- bmalloc.h