O programa trava quando o tamanho da matriz é de um milhão [duplicado]

Duplicata Possível:
Matriz grande fornece erro de segmentação em C

Eu estou tentando comparar tipo de mesclagem e tipo rápido com diferentes tamanhos de entrada, como 10.000, 100.000 e 1.000.000. No entanto, quando eu dou um milhão programa de tamanho de entrada está falhando e eu não sei por quê ?. Por outro lado, matriz é preenchida com a leitura de um arquivo que contém números e aqui está o meu tipo de mesclagem simples.

#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>

#define SIZE 1000000

void Merge(int * , int , int , int );
void MergeSort(int *array, int left, int right);

int main(){

    struct timeval tv; 
    struct timezone tz; 
    struct tm *tm; 
    long start,stop;

    long i,num;
    int array[SIZE];

    FILE* fptr;

    gettimeofday(&tv, &tz); 
    tm = localtime(&tv.tv_sec); 
    printf("TIMESTAMP-START\t %d:%02d:%02d:%d (~%d ms)\n", tm->tm_hour, 
    tm->tm_min, tm->tm_sec, tv.tv_usec, 
    tm->tm_hour * 3600 * 1000 + tm->tm_min * 60 * 1000 + 
    tm->tm_sec * 1000 + tv.tv_usec / 1000);

    start = tm->tm_hour * 3600 * 1000 + tm->tm_min * 60 * 1000 + tm->tm_sec * 1000 + tv.tv_usec / 1000;

    fptr = fopen ("onemillion.txt","r");

    for(i=0; i<SIZE-1; i++){

        fscanf(fptr,"%d",&num);
        array[i]=num;
    }

    MergeSort(array,0,SIZE-1);

    /*for(i = 0;i < SIZE;i++)
        {
                printf("%d \n",array[i]);
        }*/

    gettimeofday(&tv, &tz); 
    tm = localtime(&tv.tv_sec); 
    stop = tm->tm_hour * 3600 * 1000 + tm->tm_min * 60 * 1000 + 
    tm->tm_sec * 1000 + tv.tv_usec / 1000; 
    printf("TIMESTAMP-END\t %d:%02d:%02d:%d (~%d ms) \n", tm->tm_hour, 
    tm->tm_min, tm->tm_sec, tv.tv_usec, 
    tm->tm_hour * 3600 * 1000 + tm->tm_min * 60 * 1000 + 
    tm->tm_sec * 1000 + tv.tv_usec / 1000); 

    printf("ELAPSED\t %d ms\n", stop - start);

    return 0;

}

void MergeSort(int *array, int left, int right)
{
        int mid = (left+right)/2;
        /* We have to sort only when left<right because when left=right it is anyhow sorted*/
        if(left<right)
        {
                /* Sort the left part */
                MergeSort(array,left,mid);
                /* Sort the right part */
                MergeSort(array,mid+1,right);
                /* Merge the two sorted parts */
                Merge(array,left,mid,right);
        }
}

void Merge(int *array, int left, int mid, int right)
{
        /*We need a Temporary array to store the new sorted part*/
        int tempArray[right-left+1];
        int pos=0,lpos = left,rpos = mid + 1;
        while(lpos <= mid && rpos <= right)
        {
                if(array[lpos] < array[rpos])
                {
                        tempArray[pos++] = array[lpos++];
                }
                else
                {
                        tempArray[pos++] = array[rpos++];
                }
        }
        while(lpos <= mid)  tempArray[pos++] = array[lpos++];
        while(rpos <= right)tempArray[pos++] = array[rpos++];
        int iter;
        /* Copy back the sorted array to the original array */
        for(iter = 0;iter < pos; iter++)
        {
                array[iter+left] = tempArray[iter];
        }
        return;
}

quando eu tento com mil, dez mil e cem mil não tem problema. Como eu disse eu luto com um milhão de tamanho de entrada. Eu não tenho certeza, mas eu acho que é sobre o uso de uma matriz? Eu ficarei feliz se você puder ajudar e agradecer de qualquer maneira.

questionAnswers(2)

yourAnswerToTheQuestion