This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Integer Array Size Problem
- From: "Digvijoy Chatterjee" <chatterjee dot digvijoy at gmail dot com>
- To: gcc-help at gnu dot org
- Date: Sun, 3 Dec 2006 13:56:04 -0500
- Subject: Integer Array Size Problem
Hi ,
I was trying to test algorithms with huge int arrays when i started
getting segfaults..here is a simple program which emulates this
behaviour...
Each time i run this program , it segfaults , This might be very naive
..but can anyone help me with what I am missing here ?
static const int N=10000000;
int main()
{
int c, i[N];
for (c=0;c<N ; c++ )
i[c]=c;
}
Thanks
Digz