title: How do i use subprocesses to force python to release memory?
body: <p>I was reading up on <a href="http://deeplearning.net/software/theano/tutorial/python-memory-management.html" rel="noreferrer">Python Memory Management</a> and would like to reduce the memory footprint of my application. <a href="https://stackoverflow.com/a/1316799">It was suggested</a> that <a href="https://docs.python.org/2/library/subprocess.html" rel="noreferrer">subprocesses</a> would go a long way in mitigating the problem; but i'm having trouble conceptualizing what needs to be done. Could some one please provide a simple example of how to turn this...</p>
  <pre><code>def my_function():
      x = range(1000000)
      y = copy.deepcopy(x)
      del x
      return y
  
  @subprocess_witchcraft
  def my_function_dispatcher(*args):
      return my_function()
  </code></pre>
  <p>...into a <em>real</em> subprocessed function that doesn't store an extra &quot;free-list&quot;?</p>
  <h3>Bonus Question:</h3>
  <p>Does this &quot;free-list&quot; concept apply to python c-extensions as well?</p>