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

Method address_fields

crates/virtual-machine/src/memory/cache.rs:120–125  ·  view source on GitHub ↗
(&self, addr: u64)

Source from the content-addressed store, hash-verified

118 let offset = addr & ((1u64 << self.block_bits) - 1);
119 (tag, index, offset)
120 }
121
122 fn line_base_address(&self, tag: u64, index: u64) -> u64 {
123 (tag << (self.block_bits + self.set_bits)) | (index << self.block_bits)
124 }
125
126 // Resolve an address to (set_idx, way_idx, was_miss). Misses fetch from the next
127 // level and write back dirty victims; hits and fills update the LRU age.
128 fn resolve_line(&mut self, addr: u64) -> Result<(usize, usize, bool), VmError> {

Callers 2

resolve_lineMethod · 0.80
peek_byte_rawMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected