Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages

Group of classes which help controlling external memory space, managing disks, and allocating and deallocating blocks of external storage. More...

+ Collaboration diagram for Block Management Layer:

Modules

 Allocation Functors
 
 Block Scheduling Sublayer
 
 Internals
 

Namespaces

 foxxll::mng_local
 Block Manager Internals.
 

Classes

class  BID< Size >
 
class  BID< 0 >
 Specialization of block identifier class (BID) for variable size block size. More...
 
class  block_manager
 Block manager class. More...
 
class  config
 
class  disk_block_allocator
 This class manages allocation of blocks onto a single disk. More...
 
class  disk_config
 
class  typed_block< RawSize, Type, NRef, MetaInfoType >
 

Typedefs

template<size_t BlockSize>
using BIDArray = tlx::simple_vector< BID< BlockSize > >
 

Functions

template<size_t BlockSize>
void delete_block (const BID< BlockSize > &bid)
 
template<typename BIDIterator >
void delete_blocks (const BIDIterator &bid_begin, const BIDIterator &bid_end)
 
template<typename DiskAssignFunctor , typename BIDIterator >
void new_blocks (const DiskAssignFunctor &functor, BIDIterator bid_begin, BIDIterator bid_end, size_t alloc_offset=0)
 Allocates new blocks. More...
 
template<size_t BlockSize>
std::ostream & operator<< (std::ostream &s, const BID< BlockSize > &bid)
 

Detailed Description

Group of classes which help controlling external memory space, managing disks, and allocating and deallocating blocks of external storage.

Typedef Documentation

using BIDArray = tlx::simple_vector<BID<BlockSize> >

Definition at line 198 of file bid.hpp.

Function Documentation

void delete_blocks ( const BIDIterator &  bid_begin,
const BIDIterator &  bid_end 
)

Deallocates blocks.

Deallocates blocks in the range [ bid_begin, bid_end)

Parameters
bid_beginiterator object of bid_iterator concept
bid_enditerator object of bid_iterator concept

Definition at line 271 of file block_manager.hpp.

References block_manager::delete_block().

void new_blocks ( const DiskAssignFunctor &  functor,
BIDIterator  bid_begin,
BIDIterator  bid_end,
size_t  alloc_offset = 0 
)

Allocates new blocks.

Allocates new blocks according to the strategy given by functor and stores block identifiers to the range [ bid_begin, bid_end) Allocation will be lined up with previous partial allocations of alloc_offset blocks. For BID<0> allocations, the objects' size field must be initialized.

Parameters
functorobject of model of allocation_strategy concept
bid_beginbidirectional BID iterator object
bid_endbidirectional BID iterator object
alloc_offsetadvance for functor to line up partial allocations

Definition at line 165 of file block_manager.hpp.

References block_manager::block_allocators_, block_manager::current_allocation_, block_manager::disk_files_, SimpleVector< ValueType, Mode >::fill(), max(), block_manager::maximum_allocation_, block_manager::mutex_, block_manager::ndisks_, SimpleVector< ValueType, Mode >::resize(), SimpleVector< ValueType, Mode >::size(), TLX_LOGC, block_manager::total_allocation_, and block_manager::verbose_block_life_cycle.

Referenced by block_manager::new_block().

std::ostream& foxxll::operator<< ( std::ostream &  s,
const BID< BlockSize > &  bid 
)

Prints a BID to an ostream using the following format

*  [0x12345678|0]0x00100000/0x00010000
*  [file ptr|file id]offset/size
* 
Note
Can be used to replace the obsolete FMT_BID macro

Definition at line 176 of file bid.hpp.