Memory leaks in VC6 2 line Python 2.1b1 apps?

Craig Holman craig at patterncraft.com
Sat Mar 10 12:17:11 EST 2001


I wish that Visual Studio's memory-leak reporter were smart enough to
display where the leaked blocks of memory were allocated.  It only puts out
pairs of lines like the following :

{1037} normal block at 0x0079CE80, 39 bytes long.
 Data: <  y             > 20 EE 79 00 88 85 1F 1E 03 00 00 00 B8 17 20 1E

The other lines in the annotated dump were added by me.  They contain the
results of my efforts to figure out where the leaked blocks were allocated.
After each of the pair of lines produced by the memory-leak reporter, I've
listed my best guess as to what kind of a block was leaked and why, the line
in the Python 2.1b1 source file that I placed a breakpoint at that allocates
the leaked memory block, and a snapshot of the relevant part of the runtime
stack at the point that the breakpoint was hit and execution was paused.  I
haven't identified where all of the leaked blocks are being allocated yet.

Hope this helps,
Craig

"Owen F. Ransen" <ransen_spam_me_not at nemo.it> wrote in message
news:3aa91ea5.645940 at news.newsguy.com...
> On Fri, 9 Mar 2001 10:28:33 -0600, "Craig Holman"
> <craig at patterncraft.com> wrote:
>
> >Greetings,
> >
> >I'm afraid that both versions 2.0 and 2.1b1 leak memory for a single
> >Py_Initialize, Py_Finalize sequence in a
> >Visual C++ MFC application.
>
> Phew! I thought it was just me!  ;)
>
> I hope someone understands the rest of your post, I'm too new
> to Python embedding to help. Also, for some reason, though I
> did rebuild from source, VC gives me the leak "number" but not
> the line in the library which caused it.
>
>
> --
> Owen F. Ransen
> http://www.ransen.com/
> Home of Gliftic & Repligator Image Generators





More information about the Python-list mailing list