Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Details on: "malloc: *** mmap(size=16883712) failed (error code=12)"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Details on: "malloc: *** mmap(size=16883712) failed (error code=12)"

On May 9, 2008, at 4:16 PM, Sean McBride wrote:
Sometimes I see messages like:

malloc: *** mmap(size=16883712) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug

I'm trying to find more details about this message. Specifically, what
is error code 12?

/usr/include/sys/errno.h : #define ENOMEM 12 /* Cannot allocate memory */

In my case, it is a 32 bit process using 60 MB of 'real memory' and 1.2
GB of 'virtual memory' (says Activity Monitor).

For a mmap() the "real" (aka resident) memory is unlikely to be relevant.

I'm trying to determine if 1) the process' virtual memory is just really
fragmented and it really can't allocate 16.8 MB, or 2) I have some kind
of memory smasher or other bug.

I'd give vmmap a try and look for a VM fragmentation issue.


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

 >Details on: "malloc: *** mmap(size=16883712) failed (error code=12)" (From: "Sean McBride" <email@hidden>)

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.