title: nothrow or exception?
body: <p>I am a student and I have small knowledge on C++, which I try to expand. This is more of a philosophical question.. I am not trying to implement something.</p>
  
  <p>Since</p>
  
  <pre><code>#include &lt;new&gt; 
  //...
  T * t = new (std::nothrow) T();
  if(t)
  {
      //...
  }
  //...
  </code></pre>
  
  <p>Will hide the Exception, and since dealing with Exceptions is heavier compared to a simple <code>if(t)</code>, why isn't the normal <code>new T()</code> not considered less good practice, considering we will have to use <code>try-catch()</code> to check if a simple allocation succeeded (and if we don't, just watch the program die)?? </p>
  
  <p>What are the benefits (if any) of the normal <code>new</code> allocation compared to using a <code>nothrow new</code>? Exception's overhead in that case is insignificant ?</p>
  
  <p>Also, Assume that an allocation fails (eg. no memory exists in the system). Is there anything the program can do in that situation, or just fail gracefully. There is no way to find free memory on the heap, when all is reserved, is there?</p>
  
  <p>Incase an allocation fails, and an <code>std::bad_alloc</code> is <code>throw</code>n, how can we assume that since there is not enough memory to allocate an object (Eg. a <code>new int</code>), there will be enough memory to store an exception ??</p>
  
  <p>Thanks for your time. I hope the question is in line with the rules.</p>