This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: memory


>>>>> "Josef" ==   <esg@unife.it> writes:

    Josef> Declaring char a[15000000] gives me segmentation fault with
    Josef> g++ (on RedHat 7.1). Any suggestions?

Well, the default compiler on RH 7.1 is gcc 2.96 which is just an old
development snapshot, was never intended to be released, is probably a
"bit" buggy at best and most importantly not supported in any way from
the GCC folks.

I hear, RH 8.0 is avialable and maybe it's a good time to upgrade your
distribution and compiler NOW.

Btw, the following works for me using GCC 3.2:

char a[15000000];

int main ()
{
  a[1] = 'a';
  a[2] = 'b';
}

-- 
Claudio Bley                                 ASCII ribbon campaign (")
Debian GNU/Linux advocate                     - against HTML email  X 
http://www.cs.uni-magdeburg.de/~bley/                     & vCards / \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]