title: When would the python tracemalloc module allocations statistics not match what's shown in ps or pmap?
body: <p>I'm trying to track down a memory leak, so I've done</p>
  
  <pre><code>import tracemalloc
  tracemalloc.start()
  
  &lt;function call&gt;
  
  # copy pasted this from documentation
  snapshot = tracemalloc.take_snapshot()
  top_stats = snapshot.statistics('lineno')
  
  print("[ Top 10 ]")
  for stat in top_stats[:10]:
      print(stat)
  </code></pre>
  
  <p>This shows no major allocations, all memory allocations are pretty small, while I'm seeing 8+ GB memory allocated in <code>ps</code> and <code>pmap</code> (checking before and after running the command, and after running garbage collection). Furthermore, <code>tracemalloc.get_traced_memory</code> confirms that <code>tracemalloc</code> is not seeing many allocations. <code>pympler</code> also does not see the allocations.</p>
  
  <p>Does anyone know when this could be the case? Some modules are using cython, could this cause issues for tracemalloc?</p>
  
  <p>In pmap the allocation looks like:</p>
  
  <p><code>0000000002183000 6492008 6491876 6491876 rw---   [ anon ]</code> </p>