[Coin-lpsolver] possible memory leak

John J Forrest jjforre at us.ibm.com
Mon Jun 21 07:06:55 EDT 2004




Yan,

I could not easily reproduce error (with -g) and valgrind.  But I can see
how it could happen so I have modified code - hope it works.

(Was a leak in OsiClpSolverInterface not Clp itself)

John Forrest


                                                                           
             yax2 at lehigh.edu                                               
             Sent by:                                                      
             coin-lpsolver-adm                                          To 
             in at www-124.southb                                             
             ury.usf.ibm.com           coin-lpsolver at www-124.southbury.usf 
                                       .ibm.com                            
                                                                        cc 
             06/20/2004 09:06                                              
             PM                                                            
                                                                           
                                                                           
                                                                           
                                                                   Subject 
                                       [Coin-lpsolver] possible memory     
                                       leak                                
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hi,

By running SBB through Valgrind, found memory leak in Clp (lastest in cvs):

==8290==
==8290== 920 bytes in 2 blocks are definitely lost in loss record 2 of 3
==8290==    at 0x400258E0: __builtin_vec_new (vg_replace_malloc.c:203)
==8290==    by 0x40025938: operator new[](unsigned)
(vg_replace_malloc.c:216)
==8290==    by 0x40321131: ClpPackedMatrix::scale(ClpModel*) const (in
/home/yax2/COIN/lib/libClp-O1.so)
==8290==

Probably, in function scale(), two of rowScale, usefulRow, columnScale and
usefulColumn are not deleted in some case. Also, if do not use
initialSolve()
(use resolve() instead), no memory leak are found.


Yan





-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
_______________________________________________
Coin-lpsolver mailing list
Coin-lpsolver at www-124.ibm.com
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-lpsolver






More information about the Clp mailing list