C module leaking memory

Friedrich Dominicus Friedrich.Dominicus at inka.de
Thu Aug 26 02:17:38 EDT 1999


Will Ware wrote:

The fun of manual memory management ;(

> 
> I'm working on a fairly complicated C module and it appears
> to be leaking memory. It runs a while, and then the interpreter
> gives up, saying 'MemoryError'. Are there any good pointers for
> debugging memory leaks? 

There are different packages or wrappers around malloc available. Try
e.g dmalloc and/or Electric Fence and ... 

One of the first points you can try is -Wall +W extra-options (for gcc )
and using lclint 

Dmalloc will keep book on all the allocation and freeing and this will
possibly help to find some leaks.

Regards
Friedrich




More information about the Python-list mailing list