I am operating with a large array
of struct
types in .NET that is far larger than the standard 1MB allocated for the stack (per thread). I am only concerned with the main thread for now.
I have read an old article (possibly outdated) that mentions explicitly sizing your stack: http://content.atalasoft.com/h/i/58213648-increasing-the-size-of-your-stack-net-memory-management-part-3
I have noticed that my programs frequently crash with
stackoverflow exceptions
when in 32-bit mode BUT not in 64 bit mode (my primary mode of interest).
Tentative Hypothesis
You need to explicitly increase the size of the stack when you're in 32-bit mode.
The .NET framework implicitly resizes the stack for you in 64-bit mode (even though this behaviour is not consistent with 64-bit mode).