malloc causing vm_allocate errors
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=OBMbhVO5QRuBPt5yR6EsCqBxcdp/lHCI6ZJLcpEPXhyQW5a8XTTShA/aHz5naO9mKxVgZRIGEJ/OvKdp/WsJkaAzb7xGkyK4QzrfbbTDmYNFaHYbwDAhJ0NlqjCAXu0tHXCg3xQ/SiMEOzpVnPGvFsy+a6bwk31liqPdsn4aMyQ= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=VtSIGVw+TBiOL9u05zVqdR2oZ0UU057KozUnR4xM1g8xJbjnQ+niEpSWVXvf094M/38+U2I/6E+s/lxqV/4Qlj6NfjgWcIK4HVRZrAZr0uMlfQLRUFhUKzcpvnoZzX5GieetKLarzwhxHxBHAnqnIv/fxIYJ8dfg6mohIhUrxQo= Dear Darwin users/developers I am very new to Darwin so please excuse my question if the answer is obvious... I first try to explain the situation and what I am trying to do, then I'll explain what exactly the problem is: I have a program which uses depending on the input between 1 and 2 gb of memory. The program is tested on linux for the same dataset and works without any problem there. The target system where the problem occures is a Mac pro with 2 core duo 2 processors (i think) and 4 gb of physical main memory. The OS is a recent mac os x (I have only ssh access to the computer so I cannot access any gui tools and don't know how to get system information in console). I have also checked ulimit where I have not found any memory constraints set. My program contains somewhere following code grid = (double***)malloc(Nx*sizeof(double**)); for (i = 0; i < Nx; i++) { grid[i] = (double**)malloc(Ny*sizeof(double*)); for (j = 0; j < Ny; j++) grid[i][j] = (double*)malloc(Nz*sizeof(double)); } With the dataset in question this code will allocate about 1.1gb (in linux, i386 & amd64) without complaining a bit. Running the same code in darwin results in a ton of identical messages: renyi(8200) malloc: *** error: can't allocate region renyi(8200) malloc: *** set a breakpoint in szone_error to debug renyi(8200) malloc: *** vm_allocate(size=8421376) failed (error code=3) I don't understand why this error happens and what I have to do to get rid of that error. I hope someone can give me a solution, or at least a few hints. cheers, Omar _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Omar Awile