I'm using Microsoft Visual C++ 2008 Express, and have a pretty annoying problem. It doesn't seem to happen in XP but in Vista I can't find a way around it. Whenever I declare variables non-dynamically, if their combined size exceeds about 30mb, the program will crash immediately at start-up. I know that Vista limits non-Win32 apps to 32mb of memory, but I don't think that's my issue. I'm using the Microsoft compiler, and it happens regardless if it's a win32 console app or a win32 window app. I just declare like...
int foo[1000][1000]
...or any combination of variables resulting in a similar size anywhere, and that's good-bye-application. Funny thing is, about 25 % of the times it runs even though this error exists. Am I missing some fundamental programming thingy here? Is static allocation obsolete? Am I going to have to redo the entire application to make use of dynamic allocation?