I am currently trying to write some image processing algorithms for large images in Standard C where I encountered some weird segmentation fault behaviour when trying to allocate memory for a large array. The following code already runs into a segmentation fault on my WSL instance:
int main() {
unsigned char test[8640][15360];
return 0;
}
Can anybody help me understand what is going on? The numbers are not arbitrary, they are the image height and width in my production code.