I'm having some problems with the program that follows. The error I
get is
teste(1392) malloc: *** vm_allocate(size=1069056) failed (error code=3)
teste(1392) malloc: *** error: can't allocate region
teste(1392) malloc: *** set a breakpoint in szone_error to debug
Not enough memory
for(i=0; i < 650; i++) {
for (j=0; j < 34; j++) {
for (k=0; k < 650; k++) {
matrix[i][j][k] = (int *)malloc(SIZE2*sizeof(int));
if (matrix[i][j][k] == NULL) {
printf("Not enough memory\n");
exit(1);
}
}
}
}
printf("Fourth loop\n");
return 0;
}
------------<END OF CODE>------------
The problem happens in the fourth loop. I'm using an iBook G4 1GHz,
1.12RAM (Mac OS X 10.4.2). The same program runs perfectly on a linux
machine (kernel version 2.6.8-2-686). So, I think it is some sort of
limitation that I'm not aware of.
I tried to set a breakpoint in function "szone_error", as recommeded,
but gdb doesn't stop there (I compiled it with the -g3 option).
Any hints are welcomed! :-)
P.S.: I'm actually a Java programmer trying to port one of my
programs to Objective-C. So, I may be doing something very, very
stupid! Please, be patient! :-)
P.P.S.: I'm really not sure if my problem should be posted here. If
there is a more suitable list, please let me know.
Cheers,
Ernesto.
--
Ernesto Trajano de Lima
<http://www.cin.ufpe.br/~etl>
======================
.:::. Mac OS X Powered .:::.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-userlevel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden