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-13 06:39:30
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf Of staale > Sent: Monday, May 13, 2002 9:05 AM > To: Dev-C++ Mailing List > Subject: Re: [DEV-C++] BUG: Dev-C 4.9.20 consolprogram has > only access to 1MB memory. > > > Well, I'll hold my horses a bit longer before I cry wolf, > wolf the next > time.:o) > > As Ioannis has pointed out the different results are > differences in the > implementation of the mingw32 compiler. Evolving from > allowing ca 31MB stack > space to ca 2MB. Probably to prevent us from cheating? > > The following code shows that you have access to all the > memory your OS will > give you *S*. > > New return 0 if out of mem (I think!) No, in case of failure new throws by default an std::bad_alloc exception defined in <new>. It doesn't return 0. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |