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

Method new

crates/virtual-machine/src/memory/rom.rs:17–20  ·  view source on GitHub ↗

Create a ROM from a byte vector. `base` is the start address in the system memory map (normally `0x0000_0000`).

(base: u64, data: Vec<u8>)

Source from the content-addressed store, hash-verified

15 /// Create a ROM from a byte vector. `base` is the start address in the system
16 /// memory map (normally `0x0000_0000`).
17 pub fn new(base: u64, data: Vec<u8>) -> Self {
18 let size = data.len() as u64;
19 Self { data, base, size }
20 }
21
22 /// Quick check whether an address falls inside this ROM.
23 pub fn contains(&self, addr: u64) -> bool {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected