forked from Rativel/BurritOS
Renamed Machine::init_machine and fixed stack overflow by allocating main_memory to the heap
This commit is contained in:
@@ -18,7 +18,7 @@ use std::io::BufRead;
|
||||
pub fn _load(path : &str, instruction_size: i32) -> Machine {
|
||||
let file = fs::File::open(path).expect("Wrong filename");
|
||||
let reader = io::BufReader::new(file);
|
||||
let mut machine = Machine::_init_machine();
|
||||
let mut machine = Machine::init_machine();
|
||||
|
||||
for (i,line) in reader.lines().enumerate() {
|
||||
let res = u64::from_str_radix(&line.unwrap(), 16);
|
||||
|
||||
Reference in New Issue
Block a user