From: Rob S. <rspeer@MIT.EDU> - 2010-04-27 20:09:28
|
I found the memory leak and fixed it. The index lists, irow and jcol, were never being freed. I've attached the patch, and I've also updated my version on PyPI (csc-pysparse 1.1.1.3). -- Rob On Mon, Apr 26, 2010 at 3:09 PM, Rob Speer <rs...@mi...> wrote: > I saw that Łukasz Pankowski submitted a fix for a memory leak in > ll_mat. I updated my copy of pysparse (from the new-setup-py branch), > but I'm still getting a memory leak. > > Here's an easy way to reproduce it: > > from pysparse.sparse.spmatrix import ll_mat > mat = ll_mat(1000,1000) > mat[0,0] = 1 > for i in xrange(100000): m = mat[0,:] > for i in xrange(100000): m = mat[0,:] > ... > > If I repeat that last line indefinitely, I lose about 400 MB of memory > each time. > > -- Rob > |