User forums > Help
Heap size
lev9596:
Yeah, I was wondering if there was a way to change the heap size in CodeBlocks, i have searched all through the program and have not been able to find it....Also i would like to know if there is a default size for the heap and what it is. If i could get help with this it would be greatly appreciated. Thanks
Jedon
rcoll:
Are you talking about the actual heap used by C::B, or the heap that your program (I assume you are compiling a program) will be using?
If for your program, that would probably be a command-line option for whatever compiler you are using.
-- ron --
lev9596:
I am talking about the Heap of the program i am compiling, becuase every time i run a program in CodeBlocks that has a 2 dimensional array, i get a windows error the needs to be debugged or sent to microsoft. I also get this same problem in Visual Studio 6...and i just wondered if there was a way to change the heap size like the is in visual studio. Also what would be the syntax for a command-line option??
thomas:
When using GCC/MinGW, add the --heap switch to the linker's options. This switch has two variations:
1. --heap reserve
2. --heap reserve,commit
Consult man ld for more information. A similar option probably exists for every compiler (including the Microsoft one). If nothing helps, you can edit the PE header using a simple hex editor, or more comfortably using a tool like PEResourceExplorer. The stack size can be found in the optional header at location 0x4a.
lev9596:
Still having problems getting this to work. I am a relatively new user to this program and programming in C++. I feel really dumb...has anyone else had a problem with this b4 or is it just me??
Navigation
[0] Message Index
[#] Next page
Go to full version