|
|
| BlockMemory (BufferManager &buffer_manager, block_id_t block_id_p, MemoryTag tag_p, idx_t block_alloc_size) |
| |
|
| BlockMemory (BufferManager &buffer_manager, block_id_t block_id_p, MemoryTag tag_p, unique_ptr< FileBuffer > buffer_p, DestroyBufferUpon destroy_buffer_upon_p, idx_t size_p, BufferPoolReservation &&reservation) |
| |
| const BufferManager & | GetBufferManager () const |
| | Returns a const reference to the buffer manager.
|
| |
| BufferManager & | GetBufferManager () |
| | Returns a reference to the buffer manager.
|
| |
| block_id_t | BlockId () const |
| | Returns the block ID.
|
| |
| BlockLock | GetLock () |
| | Locks the memory block.
|
| |
| void | VerifyMutex (BlockLock &l) const |
| | Verification-only: ensure that the lock matches this memory's lock.
|
| |
| BlockState | GetState () const |
| | Returns the block state.
|
| |
| void | SetState (BlockState state_p) |
| | Sets the block state.
|
| |
| bool | IsUnloaded () const |
| | Returns true, if the block state is BLOCK_UNLOADED.
|
| |
| int32_t | GetReaders () const |
| | Returns the number of readers.
|
| |
| int32_t | IncrementReaders () |
| | Increments the number of readers prior to returning it.
|
| |
| int32_t | DecrementReaders () |
| | Decrements the number of readers prior to returning it.
|
| |
| void | SetReaders (int32_t n) |
| | Sets the number of readers.
|
| |
| MemoryTag | GetMemoryTag () const |
| | Returns the memory tag.
|
| |
| FileBufferType | GetBufferType () const |
| | Returns the file buffer type.
|
| |
| unique_ptr< FileBuffer > & | GetBuffer (BlockLock &l) |
| | Returns a reference to the unique file buffer pointer while holding the block lock.
|
| |
| unique_ptr< FileBuffer > & | GetBuffer () |
| | Returns a reference to the unique file buffer pointer.
|
| |
| void | SetBuffer (unique_ptr< FileBuffer > buffer_p) |
| | Sets the file buffer.
|
| |
| idx_t | GetEvictionSequenceNumber () const |
| | Returns the eviction sequence number.
|
| |
| idx_t | NextEvictionSequenceNumber () |
| | Increments the eviction sequence number prior to returning it.
|
| |
| int64_t | GetLRUTimestamp () const |
| | Get the LRU timestamp.
|
| |
| void | SetLRUTimestamp (int64_t timestamp_msec) |
| | Set the LRU timestamp.
|
| |
| void | SetDestroyBufferUpon (DestroyBufferUpon destroy_buffer_upon_p) |
| | Set the buffer destruction policy.
|
| |
| bool | MustAddToEvictionQueue () const |
| | Returns true, if the buffer must be added to the eviction queue.
|
| |
| bool | MustWriteToTemporaryFile () const |
| | Returns true, if the buffer cannot be destroyed, but must be kept alive in a temporary file.
|
| |
| idx_t | GetMemoryUsage () const |
| | Returns the memory usage.
|
| |
| void | SetMemoryUsage (idx_t usage) |
| | Sets the memory usage.
|
| |
| BufferPoolReservation & | GetMemoryCharge (BlockLock &l) |
| | Get the memory charge while holding the block lock.
|
| |
| BufferPoolReservation & | GetMemoryCharge () |
| | Get the memory charge.
|
| |
| void | ResizeMemory (BlockLock &l, idx_t alloc_size) |
| | Resize the memory charge.
|
| |
| void | MergeMemoryReservation (BlockLock &l, BufferPoolReservation reservation) |
| | Merge two memory charges.
|
| |
| bool | IsSwizzled () const |
| | Returns true, if there is a swizzled memory pointer, else false.
|
| |
| void | SetSwizzling (const char *unswizzler) |
| | Sets the swizzled memory pointer.
|
| |
| void | SetEvictionQueueIndex (const idx_t index) |
| | Sets the eviction queue index.
|
| |
| idx_t | GetEvictionQueueIndex () const |
| | Returns the eviction queue index.
|
| |
|
void | ChangeMemoryUsage (BlockLock &l, int64_t delta) |
| |
|
void | ConvertToPersistent (BlockLock &l, BlockHandle &new_block, unique_ptr< FileBuffer > new_buffer) |
| |
|
void | ResizeBuffer (BlockLock &l, idx_t block_size, idx_t block_header_size, int64_t memory_delta) |
| |
| bool | CanUnload () const |
| |
|
unique_ptr< FileBuffer > | UnloadAndTakeBlock (BlockLock &l) |
| |
|
void | Unload (BlockLock &l) |
| |
| shared_ptr< BlockMemory > | shared_from_this () |
| |
| shared_ptr< BlockMemory const > | shared_from_this () const |
| |
|
|
BufferManager & | buffer_manager |
| | A reference to the buffer manager.
|
| |
|
const block_id_t | block_id |
| | The block id of the block.
|
| |
|
mutex | lock |
| | The block-level lock.
|
| |
|
atomic< BlockState > | state |
| | Whether the block is loaded or unloaded.
|
| |
|
atomic< int32_t > | readers |
| | The number of concurrent readers.
|
| |
|
const MemoryTag | tag |
| | The memory tag.
|
| |
|
const FileBufferType | buffer_type |
| | The file buffer type.
|
| |
|
unique_ptr< FileBuffer > | buffer |
| | A pointer to the loaded data, if any.
|
| |
|
atomic< idx_t > | eviction_seq_num |
| | The internal eviction sequence number.
|
| |
|
atomic< int64_t > | lru_timestamp_msec |
| | The LRU timestamp for age-based eviction.
|
| |
|
atomic< DestroyBufferUpon > | destroy_buffer_upon |
| | When to destroy the data buffer.
|
| |
| atomic< idx_t > | memory_usage |
| |
|
BufferPoolReservation | memory_charge |
| | The current memory reservation/usage.
|
| |
|
const char * | unswizzled |
| | Swizzled memory pointers.
|
| |
|
atomic< idx_t > | eviction_queue_idx |
| | The eviction queue index, currently only FileBufferType::MANAGED_BUFFER.
|
| |