I need to find max size of array that my computer can create. I use below code for find that in C. But it gives me 300 as an input. But i can allocate more than 1 million. I need to find exact value about that. My Code:
int main(){
 int *dizi=(int *)malloc(sizeof(int));
 int i=1,x=1,sayac;
 while(x!=0){
      dizi=(int *)realloc(dizi,i*sizeof(int));
      sayac++;
      if(dizi[sayac]==NULL){
           x=0;
      }
 }
 printf("%d",sayac);
 free(dizi);
}
 
    