VLink  2.3.0
A high-performance communication middleware
vlink::MemoryPool::Config Struct Referencefinal

Constructor configuration for tiers, preallocation, cross-shard batch size and lazy scaling. More...

#include <memory_pool.h>

Collaboration diagram for vlink::MemoryPool::Config:

Public Attributes

std::vector< Tier > tiers
 Tier descriptors; empty or all-sentinel selects bypass mode. More...
 
bool prealloc {false}
 When true, eagerly fill every managed tier to its quota. More...
 
size_t batch_size {16U}
 Maximum nodes transferred per cross-shard steal; 0 uses 16. More...
 
bool lazy_scale {false}
 When true, scale lazy chunk installs with the tier quota. More...
 

Detailed Description

Constructor configuration for tiers, preallocation, cross-shard batch size and lazy scaling.

prealloc controls whether the constructor immediately fills every tier to its full blocks_per_chunk quota. Default false keeps the lazy growth path. Preallocation is best effort; any tier whose ::operator new fails stays in lazy state and the constructor continues. batch_size limits how many nodes an empty shard transfers from another shard while holding its short free-list lock; 0 falls back to the default 16. lazy_scale switches the lazy install cap from 64 KiB (or one larger block) to one sixteenth of the tier quota (never below 32 KiB or one block), so higher quotas need fewer upstream calls.

Member Data Documentation

◆ batch_size

size_t vlink::MemoryPool::Config::batch_size {16U}

Maximum nodes transferred per cross-shard steal; 0 uses 16.

◆ lazy_scale

bool vlink::MemoryPool::Config::lazy_scale {false}

When true, scale lazy chunk installs with the tier quota.

◆ prealloc

bool vlink::MemoryPool::Config::prealloc {false}

When true, eagerly fill every managed tier to its quota.

◆ tiers

std::vector<Tier> vlink::MemoryPool::Config::tiers

Tier descriptors; empty or all-sentinel selects bypass mode.


The documentation for this struct was generated from the following file: