STXXL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::disk_allocator Class Reference

Detailed Description

Definition at line 41 of file disk_allocator.h.

+ Inheritance diagram for stxxl::disk_allocator:
+ Collaboration diagram for stxxl::disk_allocator:

Classes

struct  first_fit
 

Public Member Functions

 disk_allocator (stxxl::file *storage, const disk_config &cfg)
 
 ~disk_allocator ()
 
template<unsigned BlockSize>
void delete_block (const BID< BlockSize > &bid)
 
int64 get_free_bytes () const
 
int64 get_total_bytes () const
 
int64 get_used_bytes () const
 
template<unsigned BlockSize>
void new_blocks (BIDArray< BlockSize > &bids)
 
template<unsigned BlockSize>
void new_blocks (BID< BlockSize > *begin, BID< BlockSize > *end)
 

Private Types

typedef std::pair
< stxxl::int64, stxxl::int64
place
 
typedef std::map< stxxl::int64,
stxxl::int64
sortseq
 

Private Member Functions

void add_free_region (stxxl::int64 block_pos, stxxl::int64 block_size)
 
void deallocation_error (stxxl::int64 block_pos, stxxl::int64 block_size, const sortseq::iterator &pred, const sortseq::iterator &succ) const
 
void dump () const
 
void grow_file (stxxl::int64 extend_bytes)
 
- Private Member Functions inherited from stxxl::noncopyable
 noncopyable ()
 

Private Attributes

bool autogrow
 
stxxl::int64 cfg_bytes
 
stxxl::int64 disk_bytes
 
stxxl::int64 free_bytes
 
sortseq free_space
 
stxxl::mutex mutex
 
stxxl::filestorage
 

Member Typedef Documentation

Definition at line 43 of file disk_allocator.h.

Definition at line 55 of file disk_allocator.h.

Constructor & Destructor Documentation

stxxl::disk_allocator::disk_allocator ( stxxl::file storage,
const disk_config cfg 
)
inline

Definition at line 86 of file disk_allocator.h.

References stxxl::disk_config::size.

stxxl::disk_allocator::~disk_allocator ( )
inline

Definition at line 97 of file disk_allocator.h.

Member Function Documentation

void stxxl::disk_allocator::add_free_region ( stxxl::int64  block_pos,
stxxl::int64  block_size 
)
private

Definition at line 64 of file disk_allocator.cpp.

References STXXL_THROW2, and STXXL_VERBOSE2.

void stxxl::disk_allocator::deallocation_error ( stxxl::int64  block_pos,
stxxl::int64  block_size,
const sortseq::iterator &  pred,
const sortseq::iterator &  succ 
) const
private

Definition at line 41 of file disk_allocator.cpp.

References STXXL_ERRMSG.

template<unsigned BlockSize>
void stxxl::disk_allocator::delete_block ( const BID< BlockSize > &  bid)
inline
void stxxl::disk_allocator::dump ( ) const
private

Definition at line 28 of file disk_allocator.cpp.

References STXXL_ERRMSG.

int64 stxxl::disk_allocator::get_free_bytes ( ) const
inline

Definition at line 104 of file disk_allocator.h.

int64 stxxl::disk_allocator::get_total_bytes ( ) const
inline

Definition at line 114 of file disk_allocator.h.

int64 stxxl::disk_allocator::get_used_bytes ( ) const
inline

Definition at line 109 of file disk_allocator.h.

void stxxl::disk_allocator::grow_file ( stxxl::int64  extend_bytes)
inlineprivate

Definition at line 75 of file disk_allocator.h.

template<unsigned BlockSize>
void stxxl::disk_allocator::new_blocks ( BIDArray< BlockSize > &  bids)
inline
template<unsigned BlockSize>
void stxxl::disk_allocator::new_blocks ( BID< BlockSize > *  begin,
BID< BlockSize > *  end 
)

Member Data Documentation

bool stxxl::disk_allocator::autogrow
private

Definition at line 63 of file disk_allocator.h.

stxxl::int64 stxxl::disk_allocator::cfg_bytes
private

Definition at line 61 of file disk_allocator.h.

stxxl::int64 stxxl::disk_allocator::disk_bytes
private

Definition at line 60 of file disk_allocator.h.

stxxl::int64 stxxl::disk_allocator::free_bytes
private

Definition at line 59 of file disk_allocator.h.

sortseq stxxl::disk_allocator::free_space
private

Definition at line 58 of file disk_allocator.h.

stxxl::mutex stxxl::disk_allocator::mutex
private

Definition at line 57 of file disk_allocator.h.

stxxl::file* stxxl::disk_allocator::storage
private

Definition at line 62 of file disk_allocator.h.


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