From: Roman G. <rom...@gm...> - 2010-08-04 19:42:58
|
Hi I got this bug report (with proposed fix) from a pysparse user. It sounds like it concerns some of the newer code (which I'm unfamiliar with). Could you please take a look at it? Thanks, Roman Begin forwarded message: > From: Andreea Georgiana Gane <and...@gm...> > Date: July 26, 2010 9:17:36 PM GMT+02:00 > To: ro...@ge... > Subject: ll_mat memory leak > > Hi, > > I have recently downloaded the latest version of pysparse (pysparse-1.1.1) and I want to report a memory leak in the ll_mat implementation. > > For the following code: > for i in range(nt): > # get max value and index on each row > row = relTT[i,:] > the program crashed with MemoryError at about 13000th iteration (relTT was a ll_mat matrix of size 63751 x 63751). > > It seems the problem was in the getSubMatrix_FromList implementation, since when "we have a mixture of index sets", some indexes were created (irow, jcol) and the memory they occupied was never deallocated (lines 850-887 in the ll_mat.c file). Freeing the allocated index/indexes before each return of the function solved my problem. > > Best regards, > Andreea |