improve memory initialization
This commit is contained in:
parent
4731e932cc
commit
5e961163c4
|
@ -94,9 +94,9 @@ struct Instruction {
|
||||||
|
|
||||||
impl Ram {
|
impl Ram {
|
||||||
fn new() -> Self {
|
fn new() -> Self {
|
||||||
let mut mem = Vec::new();
|
Self {
|
||||||
mem.resize((RAM_SIZE - RAM_BASE) as usize, 0);
|
mem: vec![0; (RAM_SIZE - RAM_BASE) as usize],
|
||||||
Self { mem }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue