Sadly it doesn&#x27;t on linux due to overcommit. You can actually get the failure much later when you try to use the memory. The exception is when you try to allocate absolutely huge buffers. So malloc returning a valid pointer doesn&#x27;t indicate success (though it returning NULL does indicate failure).