Block manager class.
Manages allocation and deallocation of blocks in multiple/single disk setting
Definition at line 61 of file block_manager.h.
|
| ~block_manager () |
|
template<unsigned BLK_SIZE> |
void | delete_block (const BID< BLK_SIZE > &bid) |
| Deallocates a block. More...
|
|
template<class BIDIteratorClass > |
void | delete_blocks (const BIDIteratorClass &bidbegin, const BIDIteratorClass &bidend) |
| Deallocates blocks. More...
|
|
uint64 | get_current_allocation () const |
| return currently allocated bytes More...
|
|
uint64 | get_free_bytes () const |
| Return total number of free disk allocations. More...
|
|
uint64 | get_maximum_allocation () const |
| return maximum number of bytes allocated during program run. More...
|
|
uint64 | get_total_allocation () const |
| return total requested allocation in bytes More...
|
|
uint64 | get_total_bytes () const |
| return total number of bytes available in all disks More...
|
|
template<typename DiskAssignFunctor , unsigned BLK_SIZE> |
void | new_block (const DiskAssignFunctor &functor, BID< BLK_SIZE > &bid, unsigned_type offset=0) |
| Allocates a new block according to the strategy given by functor and stores the block identifier to bid. Allocation will be lined up with previous partial allocations of offset blocks. More...
|
|
template<class DiskAssignFunctor , class BIDIteratorClass > |
void | new_blocks (const DiskAssignFunctor &functor, BIDIteratorClass bidbegin, BIDIteratorClass bidend, unsigned_type offset=0) |
| Allocates new blocks. More...
|
|
template<class BlockType , class DiskAssignFunctor , class BIDIteratorClass > |
void | new_blocks (const unsigned_type nblocks, const DiskAssignFunctor &functor, BIDIteratorClass out, unsigned_type offset=0) |
| 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. More...
|
|
template<class BIDType , class DiskAssignFunctor , class OutputIterator > |
void | new_blocks_int (const unsigned_type nblocks, const DiskAssignFunctor &functor, unsigned_type offset, OutputIterator out) |
|
template<typename DiskAssignFunctor , unsigned BLK_SIZE>
void stxxl::block_manager::new_block |
( |
const DiskAssignFunctor & |
functor, |
|
|
BID< BLK_SIZE > & |
bid, |
|
|
unsigned_type |
offset = 0 |
|
) |
| |
|
inline |
template<class DiskAssignFunctor , class BIDIteratorClass >
void stxxl::block_manager::new_blocks |
( |
const DiskAssignFunctor & |
functor, |
|
|
BIDIteratorClass |
bidbegin, |
|
|
BIDIteratorClass |
bidend, |
|
|
unsigned_type |
offset = 0 |
|
) |
| |
|
inline |
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 |
Definition at line 109 of file block_manager.h.
Referenced by stxxl::hash_map::buffered_writer< BlockType, BidContainer >::append(), stxxl::priority_queue_local::ext_merger< BlockType, CompareType, Arity, AllocStr >::append_merger(), stxxl::stream::basic_runs_creator< Input, CompareType, BlockSize, AllocStr >::compute_result(), stxxl::stream::runs_creator< use_push< ValueType >, CompareType, BlockSize, AllocStr >::compute_result(), stxxl::ppq_local::external_array< ValueType, BlockSize, AllocStrategy >::external_array(), stxxl::stream::runs_creator< from_sorted_sequences< ValueType >, CompareType, BlockSize, AllocStr >::finish(), stxxl::hash_map::buffered_writer< BlockType, BidContainer >::flush(), stxxl::ksort_local::ksort_blocks(), 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 >
void stxxl::block_manager::new_blocks |
( |
const unsigned_type |
nblocks, |
|
|
const DiskAssignFunctor & |
functor, |
|
|
BIDIteratorClass |
out, |
|
|
unsigned_type |
offset = 0 |
|
) |
| |
|
inline |
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 131 of file block_manager.h.