#8905: Memory leak in echelon over QQ
-------------------------+--------------------------------------------------
   Reporter:  SimonKing  |       Owner:  tbd               
       Type:  defect     |      Status:  new               
   Priority:  major      |   Milestone:                    
  Component:  memleak    |    Keywords:  memleak echelonize
     Author:             |    Upstream:  N/A               
   Reviewer:             |      Merged:                    
Work_issues:             |  
-------------------------+--------------------------------------------------
 Apparently there is a memory leak in Sage-4.4 when one echelonizes a
 matrix over ``QQ``:
 {{{
 sage: MS = MatrixSpace(QQ,8)
 sage: M = MS.random_element()
 sage: N = copy(M)
 sage: N.echelonize()
 sage: N==M
 False
 sage: mem = get_memory_usage()
 sage: n = 0
 sage: while(1):
 ....:     n+=1
 ....:     if get_memory_usage()>mem:
 ....:         mem = get_memory_usage()
 ....:         print mem,n
 ....:     N = copy(M)
 ....:     N.echelonize()
 ....:
 797.95703125 1
 798.0859375 32
 798.21484375 71
 798.34375 110
 798.47265625 155
 798.6015625 199
 798.8515625 202
 798.98046875 243
 799.109375 292
 799.23828125 329
 799.37109375 371
 799.5 406
 799.79296875 426
 799.921875 471
 800.05078125 530
 800.1796875 582
 800.30859375 634
 800.61328125 666
 ...
 }}}

 Here I show that the critical step really is the echelon form:
 {{{
 sage: MS = MatrixSpace(QQ,8)
 sage: M = MS.random_element()
 sage: N = copy(M)
 sage: mem = get_memory_usage()
 sage: n = 0
 sage: while(1):
 ....:     n+=1
 ....:     if get_memory_usage()>mem:
 ....:         mem = get_memory_usage()
 ....:         print mem,n
 ....:     N = copy(M)
 ....:
 797.92578125 1
 }}}
 The memory consumption is stable at that point. So, copying ``M`` is no
 problem, but computing the echelon form is!

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8905>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to