&gt; One most modern 64-bit systems, malloc will never fail anyway<p>Except if a virtual memory resource limit is set (&quot;help ulimit&quot;).<p><pre><code>  $ sh -c &#x27;ulimit -S -v 1000  ; perl -e 1&#x27;
  Segmentation fault
  $ sh -c &#x27;ulimit -S -v 2000  ; perl -e 1&#x27;
  perl: error while loading shared libraries: libm.so.6: failed to map segment from shared object: Cannot allocate memory
  $ sh -c &#x27;ulimit -S -v 20000  ; perl -e &quot;qw{a}x100000000&quot;&#x27;
  Out of memory!</code></pre>