#10262: memory leak in scalar*vector multiplication
-----------------------------------------------+--------------------------
       Reporter:  dimpase                      |        Owner:  jason, was
           Type:  enhancement                  |       Status:  new
       Priority:  major                        |    Milestone:  sage-6.2
      Component:  linear algebra               |   Resolution:
       Keywords:  linear algebra, memory leak  |    Merged in:
        Authors:                               |    Reviewers:
Report Upstream:  N/A                          |  Work issues:
         Branch:                               |       Commit:
   Dependencies:                               |     Stopgaps:
-----------------------------------------------+--------------------------

Comment (by mmezzarobba):

 Replying to [comment:4 dimpase]:
 > My guess is that "an_element()" gets memoised, and retained instead of
 being destroyed at each for-loop.

 At least with #14711, the parent and its cached elements appear to be
 correctly destroyed after each loop turn. However, calling `an_element()`
 triggers the computation of a basis, and the whole basis is cached!
 {{{
 sage: for i in [4, 3, 2, 1, 4, 3, 2, 1]:
     del A; gc.collect(); A=(1/2)*vector([x/2 for x in range(i*1000)]);
 get_memory_usage()
 ....:
 4029
 2483.984375
 4030
 1842.5390625
 3030
 1831.33203125
 2030
 1831.33203125
 1030
 2483.984375
 4030
 1842.54296875
 3030
 1831.33203125
 2030
 1831.33203125
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/10262#comment:12>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to