[SciPy-user] How to free unused memory by Python

David Cournapeau david@ar.media.kyoto-u.ac...
Wed Sep 5 06:51:32 CDT 2007

Jouni K. Seppänen wrote:
> massimo sandal <massimo.sandal@unibo.it> writes:
>> If you know of a memory debugging tool for python, let us know!
> See Michael Droettboom's description of how he fixed a bunch of leaks in
> matplotlib:
> http://article.gmane.org/gmane.comp.python.matplotlib.devel/2804
One really useful tool with valgrind to look for memory leak is massif:


It is really easy to use, and can be used to detect and find a memory 
leak if you can easily reproduce the problem. I've used it myself to 
squash some memory leak in scipy/numpy (C extension mostly, but not 
only). It is extremely useful to improve the performances of some code 
too ( to detect if you create/recreate temporaries).


More information about the SciPy-user mailing list