[Numpy-discussion] Interesting memory leak
davidgrant at gmail.com
Thu Aug 17 19:08:28 CDT 2006
On 8/17/06, Robert Kern <robert.kern at gmail.com> wrote:
> David Grant wrote:
> > Hello all,
> > I had a massive memory leak in some of my code. It would basically end
> > up using up all 1GB of my RAM or more if I don't kill the application. I
> > managed to finally figure out which portion of the code was causing the
> > leak (with great difficulty) and have a little example which exposes the
> > leak. I am using numpy-0.9.8 and I'm wondering if perhaps this is
> > already fixed in 1.0b2. Run this through valgrind with appropriate
> > options (I used the recommended valgrind_py.sh that I found on scipy's
> > site somewhere) and this will leak 100kB. Increase the xrange on the big
> > loop and you can watch the memory increase over time in top.
> I don't see a leak in 1.0b2.dev3002.
I decided to upgrade to 1.0b2 just to see what I get and now I get 7kB of
"possibly lost" memory, coming from PyObject_Malloc (in
/usr/lib/libpython2.4.so.1.0). This is a constant 7kB, however, and it isn't
getting any larger if I increase the loop iterations. Looks good then. I
don't really know the meaning of this "possibly lost" memory.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion