-
-
Notifications
You must be signed in to change notification settings - Fork 660
Closed
Description
Originally, this ticket was about the following memory leak when computing with elliptic curves:
sage: K = GF(1<<55,'t')
sage: a = K.random_element()
sage: while 1:
....: E = EllipticCurve(j=a); P = E.random_point(); 2*P;
This example is in fact solved by #715. However, while working on that ticket, another leak has been found, namely
sage: for p in prime_range(10^5):
....: K = GF(p)
....: a = K(0)
....:
sage: import gc
sage: gc.collect()
0
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.
To be merged with #715. Apply
- the patches from Parents probably not reclaimed due to too much caching #715
- attachment: trac_11521_homset_weakcache_combined.patch
- attachment: trac_11521_callback.patch
- attachment: trac_11521_doctestfix.patch
Depends on #12969
Depends on #715
Dependencies: #12969; to be merged with #715
Component: coercion
Keywords: sd35
Author: Simon King, Nils Bruin
Reviewer: Jean-Pierre Flori, Nils Bruin, Simon King
Merged: sage-5.5.beta0
Issue created by migration from https://trac.sagemath.org/ticket/11521