#include <bmalloc.h>
Collaboration diagram for bm::mem_alloc< BA, PA >:

Template takes two parameters BA - allocator object for bit blocks and PA - allocator object for pointer blocks.
Definition at line 139 of file bmalloc.h.
Public Types | |
| typedef BA | block_allocator_type |
| typedef PA | ptr_allocator_type |
Public Member Functions | |
| mem_alloc (const BA &block_alloc=BA(), const PA &ptr_alloc=PA()) | |
| block_allocator_type | get_block_allocator () const |
| Returns copy of the block allocator object. | |
| ptr_allocator_type | get_ptr_allocator () const |
| Returns copy of the ptr allocator object. | |
| bm::word_t * | alloc_bit_block (unsigned alloc_factor=1) |
| Allocates and returns bit block. | |
| void | free_bit_block (bm::word_t *block, unsigned alloc_factor=1) |
| Frees bit block allocated by alloc_bit_block. | |
| bm::gap_word_t * | alloc_gap_block (unsigned level, const gap_word_t *glevel_len) |
| Allocates GAP block using bit block allocator (BA). | |
| void | free_gap_block (bm::gap_word_t *block, const gap_word_t *glevel_len) |
| Frees GAP block using bot block allocator (BA). | |
| void * | alloc_ptr (unsigned size=bm::set_array_size) |
| Allocates block of pointers. | |
| void | free_ptr (void *p, unsigned size=bm::set_array_size) |
| Frees block of pointers. | |
Private Attributes | |
| BA | block_alloc_ |
| PA | ptr_alloc_ |
|
|||||
|
|
|
|||||
|
|
|
||||||||||||||||
|
|
|
||||||||||
|
Allocates and returns bit block.
Definition at line 173 of file bmalloc.h. References bm::mem_alloc< BA, PA >::block_alloc_, and bm::set_block_size. |
|
||||||||||||||||
|
Allocates GAP block using bit block allocator (BA). GAP blocks in BM library belong to levels. Each level has a correspondent length described in bm::gap_len_table<>.
Definition at line 193 of file bmalloc.h. References bm::mem_alloc< BA, PA >::block_alloc_, BM_ASSERT, bm::gap_levels, and len. |
|
||||||||||
|
Allocates block of pointers.
Definition at line 217 of file bmalloc.h. References bm::mem_alloc< BA, PA >::ptr_alloc_, and size. |
|
||||||||||||||||
|
Frees bit block allocated by alloc_bit_block.
Definition at line 180 of file bmalloc.h. References bm::mem_alloc< BA, PA >::block_alloc_, IS_VALID_ADDR, and bm::set_block_size. |
|
||||||||||||||||
|
Frees GAP block using bot block allocator (BA).
Definition at line 205 of file bmalloc.h. References bm::mem_alloc< BA, PA >::block_alloc_, BM_ASSERT, bm::gap_capacity(), IS_VALID_ADDR, and len. |
|
||||||||||||||||
|
Frees block of pointers.
Definition at line 224 of file bmalloc.h. References bm::mem_alloc< BA, PA >::ptr_alloc_, and size. |
|
|||||||||
|
Returns copy of the block allocator object.
Definition at line 154 of file bmalloc.h. References bm::mem_alloc< BA, PA >::block_alloc_. |
|
|||||||||
|
Returns copy of the ptr allocator object.
Definition at line 161 of file bmalloc.h. References bm::mem_alloc< BA, PA >::block_alloc_. |
|
|||||
|
|||||
|
Definition at line 231 of file bmalloc.h. Referenced by bm::mem_alloc< BA, PA >::alloc_ptr(), and bm::mem_alloc< BA, PA >::free_ptr(). |
1.4.6
Modified on Mon Dec 07 16:24:38 2009 by modify_doxy.py rev. 173732