CUBRID Engine
latest
|
#include <lockfree_bitmap.hpp>
Public Types | |
enum | chunking_style { ONE_CHUNK = 0, LIST_OF_CHUNKS } |
Public Member Functions | |
bitmap () | |
~bitmap () | |
void | init (chunking_style style, int entries_count, float usage_ratio) |
void | destroy () |
int | get_entry () |
void | free_entry (int entry_idx) |
bool | is_full () const |
Public Attributes | |
std::atomic< unsigned int > * | bitfield |
int | entry_count |
std::atomic< int > | entry_count_in_use |
chunking_style | style |
float | usage_threshold |
std::atomic< unsigned int > | start_idx |
Static Public Attributes | |
static const float | FULL_USAGE_RATIO = 1.0f |
static const float | NINTETYFIVE_PERCENTILE_USAGE_RATIO = 0.95f |
Definition at line 31 of file lockfree_bitmap.hpp.
Enumerator | |
---|---|
ONE_CHUNK | |
LIST_OF_CHUNKS |
Definition at line 37 of file lockfree_bitmap.hpp.
lockfree::bitmap::bitmap | ( | ) |
Definition at line 35 of file lockfree_bitmap.cpp.
References FULL_USAGE_RATIO, start_idx, style, and usage_threshold.
lockfree::bitmap::~bitmap | ( | ) |
Definition at line 45 of file lockfree_bitmap.cpp.
References destroy().
void lockfree::bitmap::destroy | ( | ) |
Definition at line 57 of file lockfree_bitmap.cpp.
References lockfree::lf_bitmap_destroy().
Referenced by area_alloc(), area_flush(), lf_tran_system_destroy(), lf_tran_system_init(), and ~bitmap().
void lockfree::bitmap::free_entry | ( | int | entry_idx | ) |
Definition at line 69 of file lockfree_bitmap.cpp.
References lockfree::lf_bitmap_free_entry().
Referenced by area_free(), lockfree::tran::system::free_index(), and lf_tran_return_entry().
int lockfree::bitmap::get_entry | ( | ) |
Definition at line 63 of file lockfree_bitmap.cpp.
References lockfree::lf_bitmap_get_entry().
Referenced by area_alloc(), lockfree::tran::system::assign_index(), and lf_tran_request_entry().
void lockfree::bitmap::init | ( | chunking_style | style, |
int | entries_count, | ||
float | usage_ratio | ||
) |
Definition at line 51 of file lockfree_bitmap.cpp.
References lockfree::lf_bitmap_init().
Referenced by area_alloc_block(), lf_tran_system_init(), and lockfree::tran::system::system().
bool lockfree::bitmap::is_full | ( | ) | const |
Definition at line 75 of file lockfree_bitmap.cpp.
References entry_count, entry_count_in_use, and usage_threshold.
std::atomic<unsigned int>* lockfree::bitmap::bitfield |
Definition at line 56 of file lockfree_bitmap.hpp.
Referenced by lockfree::lf_bitmap_destroy(), lockfree::lf_bitmap_free_entry(), lockfree::lf_bitmap_get_entry(), lockfree::lf_bitmap_init(), lf_tran_compute_minimum_transaction_id(), and test_area().
int lockfree::bitmap::entry_count |
Definition at line 59 of file lockfree_bitmap.hpp.
Referenced by area_alloc_block(), is_full(), lockfree::lf_bitmap_destroy(), lockfree::lf_bitmap_free_entry(), lockfree::lf_bitmap_get_entry(), lockfree::lf_bitmap_init(), and test_area().
std::atomic<int> lockfree::bitmap::entry_count_in_use |
Definition at line 62 of file lockfree_bitmap.hpp.
Referenced by area_info(), is_full(), lockfree::lf_bitmap_destroy(), lockfree::lf_bitmap_free_entry(), lockfree::lf_bitmap_get_entry(), and lockfree::lf_bitmap_init().
|
static |
Definition at line 34 of file lockfree_bitmap.hpp.
Referenced by bitmap(), and lockfree::tran::system::system().
|
static |
Definition at line 35 of file lockfree_bitmap.hpp.
std::atomic<unsigned int> lockfree::bitmap::start_idx |
Definition at line 71 of file lockfree_bitmap.hpp.
Referenced by bitmap(), lockfree::lf_bitmap_destroy(), lockfree::lf_bitmap_free_entry(), lockfree::lf_bitmap_get_entry(), and lockfree::lf_bitmap_init().
chunking_style lockfree::bitmap::style |
Definition at line 65 of file lockfree_bitmap.hpp.
Referenced by bitmap(), lockfree::lf_bitmap_destroy(), lockfree::lf_bitmap_free_entry(), lockfree::lf_bitmap_get_entry(), and lockfree::lf_bitmap_init().
float lockfree::bitmap::usage_threshold |
Definition at line 68 of file lockfree_bitmap.hpp.
Referenced by bitmap(), is_full(), lockfree::lf_bitmap_destroy(), and lockfree::lf_bitmap_init().