I am brand new to Rust (< 3 days) but I'm sure that doing what I did is definitely not a good idea. However, I am curious as to why the program just terminates with no stack overflow or some other message right at the point of array initialization. I tried the following in my environment (stable v1.17.0) and in the Rust Playground with the same results:
fn main() {
let obuf: [u8; 20000000] = [0; 20000000];
println!("{}", obuf[0]);
}
If I make the size smaller, the program runs to completion and prints 0. If the size is too large, it seems to never get to the println! and dies with no message.
Thanks for your help