Skip to main content

Module cache

Module cache 

Source
Expand description

Cache-conscious memory management

This module provides cache-aligned allocations and NUMA-aware memory management to optimize performance on modern multi-core systems.

Structs§

CacheAlignedVec
Cache-aligned vector that ensures data starts at cache line boundaries
NumaPoolStats
Statistics for a NUMA memory pool
NumaStats
Get NUMA statistics

Constants§

CACHE_LINE_SIZE
Cache line size on most modern processors (64 bytes)

Functions§

clear_numa_pools
Clear all NUMA pools and reset statistics
get_numa_stats
Get current NUMA statistics
get_optimal_numa_node
Get the optimal NUMA node for the current thread
init_numa_pools
Initialize NUMA pools for all detected nodes
numa_alloc_aligned
Allocate memory on a specific NUMA node with cache alignment
numa_dealloc
Deallocate NUMA memory
set_current_numa_node
Set the preferred NUMA node for the current thread

Type Aliases§

NumaNode
NUMA node identifier