3 ms·
> 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 successfu
by brianfen 7y ago
> 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.