Stxxl
1.4.0
|
#include <diskallocator.h>
Classes | |
struct | FirstFit |
Public Member Functions | |
DiskAllocator (stxxl::file *storage, stxxl::int64 disk_size) | |
stxxl::int64 | get_free_bytes () const |
stxxl::int64 | get_used_bytes () const |
stxxl::int64 | get_total_bytes () const |
template<unsigned BLK_SIZE> | |
void | new_blocks (BIDArray< BLK_SIZE > &bids) |
template<unsigned BLK_SIZE> | |
void | delete_block (const BID< BLK_SIZE > &bid) |
template<unsigned BLK_SIZE> | |
void | new_blocks (BID< BLK_SIZE > *begin, BID< BLK_SIZE > *end) |
Private Types | |
typedef std::pair < stxxl::int64, stxxl::int64 > | place |
typedef std::map< stxxl::int64, stxxl::int64 > | sortseq |
Private Member Functions | |
void | dump () const |
void | deallocation_error (stxxl::int64 block_pos, stxxl::int64 block_size, const sortseq::iterator &pred, const sortseq::iterator &succ) const |
void | add_free_region (stxxl::int64 block_pos, stxxl::int64 block_size) |
void | grow_file (stxxl::int64 extend_bytes) |
Private Attributes | |
stxxl::mutex | mutex |
sortseq | free_space |
stxxl::int64 | free_bytes |
stxxl::int64 | disk_bytes |
stxxl::file * | storage |
bool | autogrow |
Definition at line 34 of file diskallocator.h.
typedef std::pair<stxxl::int64, stxxl::int64> stxxl::DiskAllocator::place [private] |
Definition at line 36 of file diskallocator.h.
typedef std::map<stxxl::int64, stxxl::int64> stxxl::DiskAllocator::sortseq [private] |
Definition at line 48 of file diskallocator.h.
stxxl::DiskAllocator::DiskAllocator | ( | stxxl::file * | storage, |
stxxl::int64 | disk_size | ||
) | [inline] |
Definition at line 78 of file diskallocator.h.
void stxxl::DiskAllocator::add_free_region | ( | stxxl::int64 | block_pos, |
stxxl::int64 | block_size | ||
) | [private] |
Definition at line 58 of file diskallocator.cpp.
References block_size, and STXXL_THROW.
void stxxl::DiskAllocator::deallocation_error | ( | stxxl::int64 | block_pos, |
stxxl::int64 | block_size, | ||
const sortseq::iterator & | pred, | ||
const sortseq::iterator & | succ | ||
) | const [private] |
Definition at line 34 of file diskallocator.cpp.
void stxxl::DiskAllocator::delete_block | ( | const BID< BLK_SIZE > & | bid | ) | [inline] |
Definition at line 121 of file diskallocator.h.
References stxxl::BID< SIZE >::offset, and stxxl::BID< SIZE >::size.
void stxxl::DiskAllocator::dump | ( | ) | const [private] |
Definition at line 20 of file diskallocator.cpp.
stxxl::int64 stxxl::DiskAllocator::get_free_bytes | ( | ) | const [inline] |
Definition at line 87 of file diskallocator.h.
stxxl::int64 stxxl::DiskAllocator::get_total_bytes | ( | ) | const [inline] |
Definition at line 97 of file diskallocator.h.
stxxl::int64 stxxl::DiskAllocator::get_used_bytes | ( | ) | const [inline] |
Definition at line 92 of file diskallocator.h.
void stxxl::DiskAllocator::grow_file | ( | stxxl::int64 | extend_bytes | ) | [inline, private] |
Definition at line 67 of file diskallocator.h.
void stxxl::DiskAllocator::new_blocks | ( | BIDArray< BLK_SIZE > & | bids | ) | [inline] |
Definition at line 103 of file diskallocator.h.
References stxxl::BIDArray< BLK_SIZE >::begin(), and stxxl::BIDArray< BLK_SIZE >::end().
void stxxl::DiskAllocator::new_blocks | ( | BID< BLK_SIZE > * | begin, |
BID< BLK_SIZE > * | end | ||
) |
Definition at line 134 of file diskallocator.h.
References stxxl::BID< SIZE >::offset, stxxl::BID< SIZE >::size, and stxxl::scoped_mutex_lock::unlock().
bool stxxl::DiskAllocator::autogrow [private] |
Definition at line 55 of file diskallocator.h.
stxxl::int64 stxxl::DiskAllocator::disk_bytes [private] |
Definition at line 53 of file diskallocator.h.
stxxl::int64 stxxl::DiskAllocator::free_bytes [private] |
Definition at line 52 of file diskallocator.h.
sortseq stxxl::DiskAllocator::free_space [private] |
Definition at line 51 of file diskallocator.h.
stxxl::mutex stxxl::DiskAllocator::mutex [private] |
Definition at line 50 of file diskallocator.h.
stxxl::file* stxxl::DiskAllocator::storage [private] |
Definition at line 54 of file diskallocator.h.