title: What causes a Python segmentation fault?
body: <p>I am implementing Kosaraju's Strong Connected Component(SCC) graph search algorithm in Python.</p>
  
  <p>The program runs great on small data set, but when I run it on a super-large graph (more than 800,000 nodes), it says "Segmentation Fault".</p>
  
  <p>What might be the cause of it? Thank you!</p>
  
  <hr>
  
  <p>Additional Info:
  First I got this Error when running on the super-large data set:</p>
  
  <pre><code>"RuntimeError: maximum recursion depth exceeded in cmp"
  </code></pre>
  
  <p>Then  I reset the recursion limit using</p>
  
  <pre><code>sys.setrecursionlimit(50000)
  </code></pre>
  
  <p>but got a 'Segmentation fault'</p>
  
  <p>Believe me it's not a infinite loop, it runs correct on relatively smaller data. It is possible the program exhausted the resources?</p>