bm::alloc_pool< BA, PA > Class Template Reference
BitMagic Library » bvector<> container » Allocator

Allocation pool object. More...

`#include <bmalloc.h>`

Inheritance diagram for bm::alloc_pool< BA, PA >:
[legend]
Collaboration diagram for bm::alloc_pool< BA, PA >:
[legend]

## Public Types

typedef BA | block_allocator_type
typedef PA | ptr_allocator_type

## Public Member Functions

| alloc_pool ()
| ~alloc_pool ()
void | set_block_limit (size_t limit) BMNOEXCEPT
bm::word_t * | alloc_bit_block ()
void | free_bit_block (bm::word_t *block) BMNOEXCEPT
void | free_pools () BMNOEXCEPT
unsigned | size () const BMNOEXCEPT
| return stack size

## Protected Attributes

pointer_pool_array | block_pool_
BA | block_alloc_
size_t | block_limit_ = 0
| soft limit for the pool of blocks

## Detailed Description

template<class BA, class PA>
class bm::alloc_pool< BA, PA >

Allocation pool object.

Examples
  sample6.cpp.

Definition at line 222 of file bmalloc.h.

## Member Typedef Documentation

## block_allocator_type

template<class BA, class PA>

typedef BA bm::alloc_pool< BA, PA >::block_allocator_type

Definition at line 225 of file bmalloc.h.

## ptr_allocator_type

template<class BA, class PA>

typedef PA bm::alloc_pool< BA, PA >::ptr_allocator_type

Definition at line 226 of file bmalloc.h.

## Constructor & Destructor Documentation

## alloc_pool()

template<class BA, class PA>

bm::alloc_pool< BA, PA >::alloc_pool | ( |  | ) |

inline

Definition at line 230 of file bmalloc.h.

## ~alloc_pool()

template<class BA, class PA>

bm::alloc_pool< BA, PA >::~alloc_pool | ( |  | ) |

inline

Definition at line 231 of file bmalloc.h.

## Member Function Documentation

## alloc_bit_block()

template<class BA, class PA>

bm::word_t * bm::alloc_pool< BA, PA >::alloc_bit_block | ( |  | ) |

inline

Definition at line 236 of file bmalloc.h.

## free_bit_block()

template<class BA, class PA>

void bm::alloc_pool< BA, PA >::free_bit_block | ( | bm::word_t * | block | ) |

inline

Definition at line 244 of file bmalloc.h.

## free_pools()

template<class BA, class PA>

void bm::alloc_pool< BA, PA >::free_pools | ( |  | ) |

inline

Definition at line 259 of file bmalloc.h.

Referenced by bm::alloc_pool< block_allocator, ptr_allocator >::~alloc_pool().

## set_block_limit()

template<class BA, class PA>

void bm::alloc_pool< BA, PA >::set_block_limit | ( | size_t | limit | ) |

inline

Definition at line 233 of file bmalloc.h.

## size()

template<class BA, class PA>

unsigned bm::alloc_pool< BA, PA >::size | ( |  | ) | const

inline

return stack size

Definition at line 272 of file bmalloc.h.

## Field Documentation

## block_alloc_

template<class BA, class PA>

BA bm::alloc_pool< BA, PA >::block_alloc_

protected

Definition at line 276 of file bmalloc.h.

## block_limit_

template<class BA, class PA>

size_t bm::alloc_pool< BA, PA >::block_limit_ = 0

protected

soft limit for the pool of blocks

Definition at line 277 of file bmalloc.h.

## block_pool_

template<class BA, class PA>

pointer_pool_array bm::alloc_pool< BA, PA >::block_pool_

protected

Definition at line 275 of file bmalloc.h.

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

- bmalloc.h