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

Method write_byte

crates/virtual-machine/tests/vm_mmu.rs:62–65  ·  view source on GitHub ↗

Writes are supported so the MMU can maintain A/D bits in PTEs.

(&mut self, addr: u64, value: u8)

Source from the content-addressed store, hash-verified

60 // Writes are supported so the MMU can maintain A/D bits in PTEs.
61 fn write_byte(&mut self, addr: u64, value: u8) -> Result<(), VmError> {
62 self.data.insert(addr, value);
63 Ok(())
64 }
65
66 fn write_halfword(&mut self, addr: u64, value: u16) -> Result<(), VmError> {
67 self.write_byte(addr, value as u8)?;
68 self.write_byte(addr + 1, (value >> 8) as u8)?;

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected