MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / get_cache_stats

Method get_cache_stats

crates/virtual-machine/src/bus.rs:145–156  ·  view source on GitHub ↗

Cheap stats-only read, no allocation. Called every step.

(
        &self,
    )

Source from the content-addressed store, hash-verified

143 // Create three-level cache hierarchy
144 // L3: 8MB, 64-byte blocks, 16-way set associative
145 let ram = Ram::new(RAM_BASE, RAM_SIZE_DEFAULT);
146 let l3_params = CacheParams {
147 size: 8 * 1024 * 1024, // 8MB
148 block_size: 64,
149 associativity: 16,
150 write_back: true,
151 read_only: false,
152 };
153 let l3_cache = Cache::new(l3_params, ram);
154
155 // L2: 256KB, 64-byte blocks, 8-way set associative
156 let l2_params = CacheParams {
157 size: 256 * 1024, // 256KB
158 block_size: 64,
159 associativity: 8,

Callers 2

render_cache_statsFunction · 0.45
refresh_snapshotMethod · 0.45

Calls 3

peek_nextMethod · 0.80
cloneMethod · 0.45
statsMethod · 0.45

Tested by

no test coverage detected