Hunting a memory leak

Will Ware wware at alum.mit.edu
Mon Sep 1 18:23:48 CEST 2003


Debian User wrote:
> I'm trying to discover a memory leak on a program of mine...

Several years ago, I came up with a memory leak detector that I used for
C extensions with Python 1.5.2. This was before there were gc.* methods
available, and I'm guessing they probably do roughly the same things.
Still, in the unlikely event it's helpful:
http://www.faqts.com/knowledge_base/view.phtml/aid/6006

Now that I think of it, this might be helpful after all. With this
approach, you're checking the total refcount at various points in the
loop in your C code, rather than only in the Python code. Take a look
anyway.

Good luck
Will Ware




More information about the Python-list mailing list