is there some way to enlarge the heapsize of a c++ program? In android you can easily do that by declaring it as large in the manifestfile.
I encountered this problem when I tried to allocate one billion array-elements on the heap.
int main() {
int size = 1000000000;
int* nmbr = new int[size];
return 0;
}
C++ itself doesn't know what the "heap" is. This is an implementation issue, so you have to look into your compiler's documentation. Here's what a Google search for "MSVC heap size flag" found:
http://msdn.microsoft.com/en-us/library/f90ybzkh.aspx
Quoting from the MSDN page:
The /HEAP option sets the size of the heap in bytes. This option is only for use when building an .exe file.
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