Hello!!
I need to do some performance test using a very big matrix (bi-dimensional array) but I have problems with this.
Is there any limitation in declarations? because if I do this:
int matriz[10000][10000];
It just don't work... it compiles but when i run the program it just closes.
Where can i read about this??
BTW I'am working on a windows xp 32bits pc with 3 gb of ram.
If you make it a local variable it will try to put the whole thing in stack space, fail, and quit, since Windows isn't going to let you have 400 megabytes of temporary variables. Try making it a global variable.
I leave the code here, maybe someone needs the same thing!
#define R 10000
#define P 10000
int main()
{ int **mat;
int j;
mat = (int **)malloc(R*sizeof(int*));
for(j=0;j<R;j++)
mat[j]=(int*)malloc(P*sizeof(int));
}