Public Member Functions |
template<class DiskAssignFunctor , class BIDIteratorClass > |
void | new_blocks (const DiskAssignFunctor &functor, BIDIteratorClass bidbegin, BIDIteratorClass bidend, unsigned_type offset=0) |
| Allocates new blocks.
|
template<class BlockType , class DiskAssignFunctor , class BIDIteratorClass > |
void | new_blocks (const unsigned_type nblocks, const DiskAssignFunctor &functor, BIDIteratorClass out, unsigned_type offset=0) |
template<typename DiskAssignFunctor , unsigned BLK_SIZE> |
void | new_block (const DiskAssignFunctor &functor, BID< BLK_SIZE > &bid, unsigned_type offset=0) |
template<class BIDIteratorClass > |
void | delete_blocks (const BIDIteratorClass &bidbegin, const BIDIteratorClass &bidend) |
| Deallocates blocks.
|
template<unsigned BLK_SIZE> |
void | delete_block (const BID< BLK_SIZE > &bid) |
| Deallocates a block.
|
| ~block_manager () |
unsigned long long | current_allocated () const |
unsigned long long | max_allocated () const |
template<class BIDType , class DiskAssignFunctor , class OutputIterator > |
void | new_blocks_int (const unsigned_type nblocks, const DiskAssignFunctor &functor, unsigned_type offset, OutputIterator out) |
Protected Member Functions |
template<class BIDType , class DiskAssignFunctor , class BIDIteratorClass > |
void | new_blocks_int (const unsigned_type nblocks, const DiskAssignFunctor &functor, unsigned_type offset, BIDIteratorClass out) |
Private Member Functions |
| block_manager () |
Private Attributes |
DiskAllocator ** | disk_allocators |
file ** | disk_files |
unsigned | ndisks |
unsigned long long | m_totalalloc |
unsigned long long | m_maxalloc |
Block manager class.
Manages allocation and deallocation of blocks in multiple/single disk setting
- Examples:
- mng/test_buf_streams.cpp, mng/test_mng.cpp, mng/test_pool_pair.cpp, and mng/test_read_write_pool.cpp.
Definition at line 59 of file mng.h.
template<class DiskAssignFunctor , class BIDIteratorClass >
Allocates new blocks.
Allocates new blocks according to the strategy given by functor and stores block identifiers to the range [ bidbegin, bidend) Allocation will be lined up with previous partial allocations of offset blocks.
- Parameters:
-
functor | object of model of allocation_strategy concept |
bidbegin | bidirectional BID iterator object |
bidend | bidirectional BID iterator object |
offset | advance for functor to line up partial allocations |
- Examples:
- mng/test_buf_streams.cpp, and mng/test_mng.cpp.
Definition at line 92 of file mng.h.
Referenced by stxxl::stream::basic_runs_creator< Input_, CompareType_, BlockSize_, AllocStr_ >::compute_result(), stxxl::stream::runs_creator< use_push< ValueType_ >, CompareType_, BlockSize_, AllocStr_ >::compute_result(), stxxl::stream::runs_creator< from_sorted_sequences< ValueType_ >, CompareType_, BlockSize_, AllocStr_ >::finish(), stxxl::priority_queue_local::ext_merger< BlockType_, Cmp_, Arity_, AllocStr_ >::insert_segment(), stxxl::ksort_local::ksort_blocks(), main(), stxxl::stream::basic_runs_merger< RunsType_, CompareType_, AllocStr_ >::merge_recursively(), stxxl::stable_ksort_local::bid_sequence< BIDType_, AllocStrategy_ >::operator[](), stxxl::stream::runs_creator< use_push< ValueType_ >, CompareType_, BlockSize_, AllocStr_ >::push(), stxxl::stream::runs_creator< from_sorted_sequences< ValueType_ >, CompareType_, BlockSize_, AllocStr_ >::push(), and stxxl::sort_local::sort_blocks().
template<class BlockType , class DiskAssignFunctor , class BIDIteratorClass >
Allocates new blocks according to the strategy given by functor and stores block identifiers to the output iterator out Allocation will be lined up with previous partial allocations of offset blocks.
- Parameters:
-
nblocks | the number of blocks to allocate |
functor | object of model of allocation_strategy concept |
out | iterator object of OutputIterator concept |
offset | advance for functor to line up partial allocations |
The BlockType
template parameter defines the type of block to allocate
Definition at line 114 of file mng.h.