Stxxl  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
stxxl::DiskAllocator Class Reference

#include <diskallocator.h>

Inheritance diagram for stxxl::DiskAllocator:
Inheritance graph
[legend]
Collaboration diagram for stxxl::DiskAllocator:
Collaboration graph
[legend]

List of all members.

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::filestorage
bool autogrow

Detailed Description

Definition at line 34 of file diskallocator.h.


Member Typedef Documentation

typedef std::pair<stxxl::int64, stxxl::int64> stxxl::DiskAllocator::place [private]

Definition at line 36 of file diskallocator.h.

Definition at line 48 of file diskallocator.h.


Constructor & Destructor Documentation

stxxl::DiskAllocator::DiskAllocator ( stxxl::file storage,
stxxl::int64  disk_size 
) [inline]

Definition at line 78 of file diskallocator.h.


Member Function Documentation

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.

template<unsigned BLK_SIZE>
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.

Definition at line 87 of file diskallocator.h.

Definition at line 97 of file diskallocator.h.

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.

template<unsigned BLK_SIZE>
void stxxl::DiskAllocator::new_blocks ( BIDArray< BLK_SIZE > &  bids) [inline]
template<unsigned BLK_SIZE>
void stxxl::DiskAllocator::new_blocks ( BID< BLK_SIZE > *  begin,
BID< BLK_SIZE > *  end 
)

Member Data Documentation

Definition at line 55 of file diskallocator.h.

Definition at line 53 of file diskallocator.h.

Definition at line 52 of file diskallocator.h.

Definition at line 51 of file diskallocator.h.

Definition at line 50 of file diskallocator.h.

Definition at line 54 of file diskallocator.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines