Possible Duplicate:
C programming, why does this large array declaration produce a segmentation fault?
I am reading an image in c language but i am unable to do so as my program is stopping in between... after debugging i found that it is due to array size... is there any restriction on maximum size of array? if i declare array of size 1400X1400 everything works fine but if i define array of size 1600X1400 my program stops working... why it is so... is there any limit imposed by compiler or OS on array size? and if so what is solution for this in c.
unsigned char idata[1400][1400]; //working fine
unsigned char idata[1600][1400]; //not working