Changes between Version 53 and Version 112 of Ticket #11521


Ignore:
Timestamp:
01/04/12 16:11:49 (9 years ago)
Author:
SimonKing
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11521

    • Property Milestone changed from sage-4.8 to sage-5.0
  • Ticket #11521 – Description

    v53 v112  
    1 The following piece of code leaks memory. [[BR]] [[BR]] sage: K = GF(1<<55,'t') [[BR]] sage: a = K.random_element() [[BR]] sage: while 1: [[BR]] ....:     E = !EllipticCurve(j=a); P = E.random_point(); 2*P;
     1Originally, this ticket was about the following memory leak when computing with elliptic curves:
     2{{{
     3sage: K = GF(1<<55,'t')
     4sage: a = K.random_element()
     5sage: while 1:
     6....:     E = EllipticCurve(j=a); P = E.random_point(); 2*P;
     7}}}
    28
    3 The problem seems to occur while resolving the action of ZZ on E.
     9This example is in fact solved by #715. However, while working on that ticket, another leak has been found, namely
     10{{{
     11sage: for p in prime_range(10^5):
     12....:     K = GF(p)
     13....:     a = K(0)
     14....:     
     15sage: import gc
     16sage: gc.collect()
     170
     18}}}
    419
    5 It does not happen if:
     20So, I suggest to start with #715 and solve the second memory leak on top of it. It seems that a strong cache for homsets is to blame. I suggest to use the weak `TripleDict` instead, which were introduced in #715.
    621
    7 - one does not change the curve in the loop
    8 
    9 - does P+P instead of a multiplication
    1022
    1123'''Apply'''