When I compile the following code using gcc test.c -o test
and then run test
, I get a Segmentation fault: 11
message:
int main(int argc, char *argv[])
{
double xs[600000];
double ys[600000];
return 0;
}
What is going on? If I remove the ys
declaration, then it works, and if I make the array size smaller (eg. 500000), then it works. I am stumped.