Re: Strange Warning Message from the Analyzer?
Re: Strange Warning Message from the Analyzer?
- Subject: Re: Strange Warning Message from the Analyzer?
- From: Jens Alfke <email@hidden>
- Date: Tue, 09 Jun 2015 10:30:03 -0700
> On Jun 9, 2015, at 9:51 AM, Quincey Morris <email@hidden> wrote:
>
> I might be misremembering, but I think this has come up before, and one other way is that malloc is allowed to return NULL if the requested size is 0. (Whether or not it does so is standard-library-implementation-dependent.)
I think I remember that coming up recently. In Darwin, malloc(0) does return a non-NULL pointer. As far as I know it’s a valid heap block that just happens to occupy 0 bytes.
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden