RE: [DEV-C++] BUG: Dev-C 4.9.20 consolprogram has only access to 1MB memory.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ho...> - 2002-05-10 16:09:13
|
> -----Original Message----- > From: jar...@ig... > [mailto:jar...@ig...] > Sent: Friday, May 10, 2002 9:44 AM > To: no...@ho... > Cc: dev...@li... > Subject: Re: [DEV-C++] BUG: Dev-C 4.9.20 consolprogram has > only access to 1MB memory. > > Of course it has. E.g. all the mingw stuff is running nicely > and I don't > think gcc/g++ will run with such a small stack. I did not understand why gcc would not run. > Furthermore Staale only wrote a small test for locating the error. > My primary failing programm (unfortunately much bigger) doesn't > allocate big arrays on the stack. Then what? > And why does Staale's program run under 4.0 ? You mean why it compiled? Because GCC permits more things than ANSI C++ (consider of it as system extensions). All compilers permit more stuff, but for code to be guaranteed to be portable, must be ANSI compliant. > > Sorry for being harsh, but I have to say so. > A C++ system which limits the stack to 0.001 Gb on machines > which have 1-4 Gb nowadays is not uptodate. All compilers have a limit of stack. In DOS times it was 64 K. Now in Windows it is 1-2 MB. With the updated code i sent to the list here is info for thhe stack on my XP system: MINGW: "C:\mingw\bin\g++.exe" -O3 -march=i686 -ansi -pedantic-errors -o temp "temp.cpp": Allocated approximately 2002 KB of stack before i die C:\c> BC++: "bcc32" -6 -O2 "temp.cpp" Allocated approximately 1006 KB of stack before i die C:\c> So as you see MINGW/GCC provides one of the largest stack! > > It's my feeling as well, that DevC++ 4.9.x generates 16 bits > applications by default. No, MINGW produces Win32 applications (even console programs do not run above pure DOS). > > Run this code to see the size of your stack: > > It would be better if there were a method to increase the > stack size. It can't believe it's a Win2000 problem. No it isn't. It is a compiler issue. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |