News for hackers. Stuff that matters.
Re:Malloc Never Fails (2012) by brianfen on Tuesday June 11, 2019 @12:52AM (#20153089)
> It has no notion of virtual or physical memory.

Exactly! That's why once virtual memory is allocated, malloc() is allowed to consider the operation successful. The standard does not care at all whether it is virtual memory allocation or physical memory allocation. It is completely unspecified in the standard what sort of memory must be allocated. So no spec in the standard is being violated by returning non-null pointer for virtual memory allocation.

There are no comments on this comment yet.