For my application I need to declare a big std::array in global memory. Its total size is about 1GB big. So I declared a global variable just like this:
#include<array>
std::array<char,1000000000> BigGlobal;
int main()
{
//Do stuff with BigGlobal
}
The code compiles fine. When I run the application I am getting the error message:
The application was unable to start correctly (0xc0000018). Click OK to close the application
I am using Visual Studio 2017. I am aware of the fact, that there is a MSVC Linker Option for the stack reserve size. But it is only relevant for local variables not for global variables. Can you please help me to fix the issue?