Re: App crashes when launched from finder, but not when launched from debugger or command line
Re: App crashes when launched from finder, but not when launched from debugger or command line
- Subject: Re: App crashes when launched from finder, but not when launched from debugger or command line
- From: "Shawn Erickson" <email@hidden>
- Date: Tue, 18 Nov 2008 08:53:48 -0800
On Tue, Nov 18, 2008 at 8:45 AM, Matt Gough <email@hidden> wrote:
> If this is something allocated via malloc then I don't see why it wouldn't
> have been nil already (assuming MallocPreScribble isn't on). I am sure that
> the default behavior of all malloc requests on Mac OS X is to zero the
> block?
The physical pages behind a virtual mapping are zero filled only when
first transferred to your process (for security reasons). Normally
malloc uses pools of pre-mapped memory and recycles allocations
without unmapping things. So allocations you get back from malloc are
not likely to be zeroed out for you. If you want zeroed memory you
have do it yourself or use calloc.
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden