I have some analyses to do in Rust. As such, I have a rather large lookup table that creates a multidimensional array requiring 430,467,210 bytes. I've tried many times to load this into Rust, but I keep getting stack overflows. Recently I learned about heap allocation using Box
and have tried to read my file into the boxed slice. It still does not work:
let mut temp_buffer = Box::new([0u8; 430467210]);
move_file.read(&mut *temp_buffer);