◆ check()
bool Btree_multi::Bulk_extent_allocator::Extent_cache::check |
( |
size_t & |
num_alloc, |
|
|
size_t & |
num_free |
|
) |
| const |
Check for number of extents to be allocated and cached.
- Parameters
-
[out] | num_alloc | number of extents to allocate |
[out] | num_free | number of free extents |
- Returns
- true if succesful.
◆ get_range()
bool Btree_multi::Bulk_extent_allocator::Extent_cache::get_range |
( |
Page_range_t & |
range, |
|
|
bool & |
alloc_trigger |
|
) |
| |
Get one page range from the cache.
- Parameters
-
[out] | range | the allocated page range |
[out] | alloc_trigger | true, if need to trigger allocator |
- Returns
- true if extent is successfully returned from cache.
◆ init()
void Btree_multi::Bulk_extent_allocator::Extent_cache::init |
( |
size_t |
max_range | ) |
|
Initialize cache.
- Parameters
-
[in] | max_range | miaximum number of extents to cache. |
◆ is_empty()
bool Btree_multi::Bulk_extent_allocator::Extent_cache::is_empty |
( |
void |
| ) |
const |
|
inline |
- Returns
- true if no available extent to consume.
◆ is_full()
bool Btree_multi::Bulk_extent_allocator::Extent_cache::is_full |
( |
| ) |
const |
|
inline |
- Returns
- true if cache is full and no more extents can be added.
◆ set_range()
void Btree_multi::Bulk_extent_allocator::Extent_cache::set_range |
( |
size_t |
index, |
|
|
Page_range_t & |
range |
|
) |
| |
Set allocated range(extent) in cache.
- Parameters
-
[in] | index | position of the range |
[in] | range | page range to be set |
◆ m_max_range
size_t Btree_multi::Bulk_extent_allocator::Extent_cache::m_max_range = S_MAX_RANGES |
Maximum number of ranges to pre-allocate.
◆ m_num_allocated
std::atomic<size_t> Btree_multi::Bulk_extent_allocator::Extent_cache::m_num_allocated {0} |
Total number of ranges allocated.
◆ m_num_consumed
std::atomic<size_t> Btree_multi::Bulk_extent_allocator::Extent_cache::m_num_consumed {0} |
Total number of ranges allocated.
◆ m_ranges
Cached page ranges already allocated to the segment.
The documentation for this struct was generated from the following files: