Expand description
Cache topology detection and cache-aware memory allocation
Detects CPU cache hierarchy (L1/L2/L3) using architecture-specific mechanisms:
- x86_64: CPUID leaf 4 (Intel) and leaf 0x8000001D (AMD)
- AArch64: hardcoded defaults (Cortex-A72)
- RISC-V: hardcoded defaults
Provides cache coloring support for NUMA-aware, cache-friendly page allocation.
Structs§
- Cache
Info - Information about a single cache level
- Cache
Topology - Complete cache topology for the current CPU
Enums§
- Cache
Level - Cache level
- Cache
Type - Cache type classification
Functions§
- frame_
color - Determine which cache color a physical frame belongs to.
- get_
cache_ info - Access the global cache topology (read-only).
- init
- Initialize the cache topology subsystem.
- is_
initialized - Check if cache topology has been initialized
- num_
colors - Get the total number of cache colors available
- preferred_
color - Suggest a preferred cache color for a given process.