Re: what is expected malloc behavior re. limits/insufficient resources?
Re: what is expected malloc behavior re. limits/insufficient resources?
- Subject: Re: what is expected malloc behavior re. limits/insufficient resources?
- From: Jack Howarth <email@hidden>
- Date: Thu, 25 Dec 2008 19:58:30 -0500
>> In a situation where the malloc request:
>>
>> is < MALLOC_ABSOLUTE_MAX_SIZE
>>
>> but > [total RAM + total free swap partition space]
>>
>> or > ulimit -v , or ulimit -d (regardless of soft/hard)
>>
>> it seems that malloc() returns a non-NULL pointer (i.e. without error).
>
> It returns a pointer into a page mapping in the process virtual address space. No physical pages are allocated until you touch them. This can exceed total RAM plus swap
+because of memory overcommit, which has pretty much been SOP on unix since the DEC VAX version introduced virtual memory.
Terry,
Why does linux treat this situation as a malloc error? Does UNIX conformance imply acceptance
of situations like this that have been addressed by the linux community?
Jack
_______________________________________________
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