This is my part of the code that occurred and segmentation fault:
int main (int argc, char *argv[]) {
printf ("====================================================\n");
double pointArray[MAX_NUM_OF_POINTS][DIMENSION];
double range;
int num_of_nearest;
double queryPoint[DIMENSION];
int counter;
int dist;
int num;
printf ("====================================================\n");
}
where MAX_NUM_OF_POINTS
was defined to be 100,000,000.
However, when I changed this number to be smaller like 100,000, the segmentation fault disappeared.
Could anyone tell me the reason?