You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to store a large array on the heap, the code produced a run-time error of stack overflow.
fnmain(){let x = Box::new([0;10_000_000]);}
I expected the array to be initialised on the heap.
Instead it seems, the array is being initialised onto the stack, and then placed onto the heap, causing the this error message. thread '<main>' has overflowed its stack.