Re: [Dev-C++] How to increase space for defining arrays
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
From: Per W. <pw...@ia...> - 2009-10-25 15:16:12
|
No, there is no "memory is memory" rule. I take it that you were trying to allocate huge amounts of data on the stack. But the stack is not intended for allocation of large memory blocks. Most operating systems requires a fixed memory region to be reserved for the stack. The OS may then allocate more or less memory into this fixed-size region but when the region is full it can't be grown. The information on the net wasn't "noise". If you do a wild-card search without knowing what you are looking for, you must realize that the majority of hits may not be relevant for you - such as how to adjust memory settings in FreeBSD. If you do narrow your searches more, you will get hits closer to your goal. But the best hits would probably recommend you to use dynamic memory instead of changing the size of the memory region reserved for stack data. /pwm On Sun, 25 Oct 2009, John Mcelvaney wrote: > > Thanks all. I figure memory is memory, but I'll try allocating the > space with malloc. > From some of the noise I've read on the web, I thought there was > some adjustment > that could be made to some configuration item, that would allow > larger size arrays to > be declared with minGW. > > > At 06:33 PM 10/24/2009, mi...@na... wrote: > >Two megs? Or "char somvar[2,000,000]"? > > > >If the latter...then that is way more than you'll probably need. That's a > >very large array. Now, if you can only allocate two mB, then something is > >wrong with the compiler, OS or with your code. Try allocating it with malloc > >instead of using a standard array. > > > >-mh. > > > >(sorry for sending to the wrong place the first time, Mr Westermark) > >----- Original Message ----- From: "Per Westermark" <pw...@ia...> > >To: "John Mcelvaney" <joh...@co...> > >Cc: <dev...@li...> > >Sent: Saturday, October 24, 2009 6:05 PM > >Subject: Re: [Dev-C++] How to increase space for defining arrays > > > > > >>Are you having problems in FreeBSD? Is there even a kern.maxdsize for > >>MinGW? > >> > >>Are you talking about global arrays, or local on the stack, or dynamically > >>allocated? Uninitialized or initialized arrays? > >> > >>/pwm > >> > >>On Sat, 24 Oct 2009, John Mcelvaney wrote: > >> > >>> > >>>I've searched all day, but I can't find any help for increasing the > >>>size for declaring arrays. I can use a little over 2 meg. I saw > >>>one suggestion about increasing the minGW "kern.maxdsize", > >>>but I can find no info on the web about how to do that. Anybody > >>>have any suggestions? p.s. I'm using Dev C++ version 4.9.9.2 > >>>and minGW32 version 3.2.4. Thanks. > >>> > >>> > >>>------------------------------------------------------------------------------ > >>>Come build with us! The BlackBerry(R) Developer Conference in SF, CA > >>>is the only developer event you need to attend this year. Jumpstart your > >>>developing skills, take BlackBerry mobile applications to market and stay > >>>ahead of the curve. Join us from November 9 - 12, 2009. Register now! > >>>http://p.sf.net/sfu/devconference > >>>_______________________________________________ > >>>Dev-cpp-users mailing list > >>>Dev...@li... > >>>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > >>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >> > >> > >>------------------------------------------------------------------------------ > >>Come build with us! The BlackBerry(R) Developer Conference in SF, CA > >>is the only developer event you need to attend this year. Jumpstart your > >>developing skills, take BlackBerry mobile applications to market and stay > >>ahead of the curve. Join us from November 9 - 12, 2009. Register now! > >>http://p.sf.net/sfu/devconference > >>_______________________________________________ > >>Dev-cpp-users mailing list > >>Dev...@li... > >>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > >>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |