Re: what is expected malloc behavior re. limits/insufficient resources?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com User-agent: Mutt/1.5.18 (2008-05-17)
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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Jack Howarth