pub struct MemoryManager { /* private fields */ }Expand description
Memory manager: the retained public stats shell over the real B1 cache.
It holds an optional handle to the shared
DecompressedChunkCache.
When present (the production path — MemoryManager::with_chunk_cache),
stats reports that cache’s real activity. When absent
(new, used where no cache is wired), the block-cache numbers
report zero.
Implementations§
Source§impl MemoryManager
impl MemoryManager
Sourcepub fn new(_config: &Config) -> Result<Self>
pub fn new(_config: &Config) -> Result<Self>
Create a memory manager not wired to a cache.
Retained for callers (and tests) that construct a manager without a live
storage engine; its stats reports zero block-cache
activity. Production opens use with_chunk_cache.
Sourcepub fn with_chunk_cache(chunk_cache: Arc<DecompressedChunkCache>) -> Self
pub fn with_chunk_cache(chunk_cache: Arc<DecompressedChunkCache>) -> Self
Create a memory manager whose stats surface reports the real activity of the shared B1 decompressed-chunk cache (issue #1568).
Sourcepub fn stats(&self) -> Result<MemoryStats>
pub fn stats(&self) -> Result<MemoryStats>
Get memory statistics.
The block-cache hit/miss counts and occupancy (total_memory_used) are
sourced from the live B1 DecompressedChunkCache when wired (issue
#1568): hit_count() / miss_count() / resident_bytes(). The retained
row-cache and buffer-pool sub-fields report a fixed 0 — the richer
honest surface is Epic B / B5. The -> Result<MemoryStats> signature is
preserved for semver compatibility with Database::stats().