Changes between Version 53 and Version 112 of Ticket #11521
 Timestamp:
 01/04/12 16:11:49 (9 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #11521

Property
Milestone
changed from
sage4.8
tosage5.0

Property
Milestone
changed from

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; 1 Originally, this ticket was about the following memory leak when computing with elliptic curves: 2 {{{ 3 sage: K = GF(1<<55,'t') 4 sage: a = K.random_element() 5 sage: while 1: 6 ....: E = EllipticCurve(j=a); P = E.random_point(); 2*P; 7 }}} 2 8 3 The problem seems to occur while resolving the action of ZZ on E. 9 This example is in fact solved by #715. However, while working on that ticket, another leak has been found, namely 10 {{{ 11 sage: for p in prime_range(10^5): 12 ....: K = GF(p) 13 ....: a = K(0) 14 ....: 15 sage: import gc 16 sage: gc.collect() 17 0 18 }}} 4 19 5 It does not happen if: 20 So, 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. 6 21 7  one does not change the curve in the loop8 9  does P+P instead of a multiplication10 22 11 23 '''Apply'''