When I'm running my application in Visual Studio 2015, I see in the diagnostic tools that the process memory is stuck to 2GB - as if there was a limit:
I read, that executing for x32
limits the available memory, so that it is necessary to use x64
. So I build relase, x64
which gives me the result shown above. How can I remove this "limit"?
Note: I have 16GB Ram hardware (OS: Windows 10).
There is no such limit, this is probably your code (or some library, that you use) uses exactly 2gb of ram.
If you try to allocate more than 2GB of memory in x86 application - you'll get std::bad_alloc exception, since OS is unable to provide more, despite, that you have 14GB more free memory.
Very simple program in MSVC2015 compiled as x64, like this:
for (int i = 0; i < 4000000; ++i) {
char* ch = new char[1024];
}
eats 4gb of RAM, and no limit is imposed by default configuration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With