Re: malloc was optimized out
Re: malloc was optimized out
- Subject: Re: malloc was optimized out
- From: Chris Ridd <email@hidden>
- Date: Tue, 05 Jul 2016 08:07:21 +0100
> On 5 Jul 2016, at 02:35, Jens Alfke <email@hidden> wrote:
>
> Operating systems behave differently with regard to overcommitting. I’m not very familiar with Linux and almost totally unfamiliar with Windows. My understanding is that Linux has some kind of “OOM Killer” process that will kill any process that’s using too much memory; presumably this happens before that process would run out of allocatable space. At the other extreme, iOS doesn’t use swap space at all and will kill a process that tries to use too much of physical RAM.
I know that Solaris (and derivative) systems explicitly don’t overcommit - if malloc returns a pointer it means that memory is all available, and there are no surprise aborts when you happen to touch a new page.
Overcommitting is popular though, and Linux’s malloc is - like OS X’s - also able to return a pointer and kill your program when you try to use it.
Chris
_______________________________________________
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