title: Can segmentation fault be caused by exhaustion of memory ?
body: <p>I am solving a problem on codechef.    </p>
  
  <p>I have coded the algorithm of the problem and it runs fine on the test cases. Although, when I run it on codechef(online), it throws segmentation fault.   </p>
  
  <p>I have double checked that, I am not accessing any inaccessible memory locations, although I suspect that my program could have taken up huge amount of memory.    </p>
  
  <p>So, my question is that Can segmentation fault be thrown, when there is no more memory available for the program to execute.  Something like <code>OutOfMemoryException</code> in C#</p>