Re: malloc causing vm_allocate errors
Re: malloc causing vm_allocate errors
- Subject: Re: malloc causing vm_allocate errors
- From: "Omar Awile" <email@hidden>
- Date: Wed, 4 Jul 2007 18:12:51 +0200
Jonas, thanks for the quick reply
On 7/4/07, Jonas Maebe <email@hidden> wrote:
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden