memory leak debugging in C modules

clee at clee at
Fri Apr 28 11:12:42 EDT 2000

I'm looking for advice on fixing memory leaks in a python C module.
How do the C modules gurus out there do it?

Thanks in advance for any help,

-chris lee

P.S.  What I've done so far:

- working on a linux machine primarily
- using gcc with -g flag
- debugging with gdb python <>
- I've done some preliminary experiments with linking my module with a
utility called electric fence, and I've tried running my module under
the gnome memory checker, memprof.  Both of these options show some
promise but clearly give problematic results.  (I won't go into all the
problems---I suspect the cause of many of them may be that my python
interpreter is compiled with the --with-threads options.  I'm going to
recompile python next.)

Sent via
Before you buy.

More information about the Python-list mailing list