title: How to debug memory leak in python application
body: <p>I have written a python code which basically scans for all the files within a folder (mining some text out of all the files present within that folder)</p>
  
  <ol>
  <li>If folder is small i.e no of files are less , then ram usage is low</li>
  <li>If no of files is beyond 100k , memory gets close to 80-90%</li>
  </ol>
  
  <p>basically doing -</p>
  
  <p>for path,subdirs,files in os.walk(folder):
      process files
      based on some logic</p>
  
  <p>once program finishes ram goes down.
  But for bigger folders it keep growing , I checked all variables declared etc but not able to debug memory leak.</p>
  
  <p>Wanna check which variable or instance keeps on growing.
  Tried using mem_top , pympler etc , but not much helpful in debugging.</p>