Re: 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:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Vc2WT52M1g8HLu7ypWPmbW9Eb/mKHtAYc3aJEzmdcFCZ5slsZyaWMaruhlvyX9obiejYiMuP1iWetfYI8dm2RehseqsWW1F2/DgCdXW6WAyCj5zDx7xaTL8oPLWYll4V4o45xmfBSpL+mmuk6dInecGxs8o4DzxOyb5Tur/IZm4= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UnoxJB0DQtL212e+6IxDMd7EbO0ozgNWFMlRLQ8wWXUD4wPm+oYoLwwWj6KoTHCurBewh6I6HDOHJyAl8Nbi//WZU2u+3CNBBSx1Ar8NklK8Tj4eCGIuh0qKjSKGpWO3oxVOmPBMliESlyQUEYIJ48yI+H5eXeVFgeGmPIIvRHk= Jonas, thanks for the quick reply On 04 Jul 2007, at 17:23, Omar Awile wrote:
I have a program which uses depending on the input between 1 and 2 gb (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). sw_vers system_profiler
Ah, now I know :-) In general: http://bhami.com/rosetta.html
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. It presumably happens because you've exhausted the VM space. This is pretty strange, since there should be at least about 2.5GB available (on PPC anyway, but I assome on i386 as well). You can try running vmmap on your process, and enable malloc debugging (man malloc, search for "debug").
Here a few more system infos: sw_vers: ProductName: Mac OS X ProductVersion: 10.4.10 BuildVersion: 8R2232 system_profiler: Hardware Overview: Model Name: Mac Pro Model Identifier: MacPro1,1 Processor Name: Dual-Core Intel Xeon Processor Speed: 3 GHz Number Of Processors: 2 Total Number Of Cores: 4 L2 Cache (per processor): 4 MB Memory: 8 GB Bus Speed: 1.33 GHz Boot ROM Version: MP11.005C.B04 SMC Version: 1.7f8 ... 'top' is telling me about VM: VM: 3.90G + 7.19M 141826(0) pageins, 0(0) pageouts (my program is not running) So this means there should be by far enough memory around. I was not yet able to check with vmmap (or malloc_history) because my program spits out these error messages after a very short time and crashes right after. Perhaps I need to emphasize that the program runs properly in darwin for some datasets, for others I get the above discribed error. cheers, omar Jonas _______________________________________________ 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/omar.awile%40gmail.com This email sent to omar.awile@gmail.com _______________________________________________ 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... On 7/4/07, Jonas Maebe <jonas.maebe@elis.ugent.be> wrote: This email sent to site_archiver@lists.apple.com
participants (1)
-
Omar Awile