#620: memory leaks affecting modular symbols
--------------------------------+------------------------
Reporter: mabshoff | Owner: mabshoff
Type: defect | Status: new
Priority: major | Milestone: sage-6.2
Component: memleak | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: 14072, 14711 | Stopgaps:
--------------------------------+------------------------
Changes (by mmezzarobba):
* dependencies: => 14072, 14711
Comment:
After a merging #14711 (actually `21aa9bc`) into `6.2.beta1` and applying
the mercurial patch from #14072 on top, the memory leak gets under
control. But it doesn't entirely disappear, as illustrated below. What
happens is apparently that the entries of
`sage.modular.hecke.algebra._cache` stay alive; I don't understand if it
is intentional or not.
{{{
sage: import objgraph, inspect, random, gc
sage: objgraph.show_growth(limit=20)
...
sage: objgraph.show_most_common_types()
function 26766
tuple 10264
dict 8604
method_descriptor 6292
weakref 4856
list 4330
wrapper_descriptor 3952
getset_descriptor 2638
builtin_function_or_method 2423
type 2046
sage: for i in range(30):
print get_memory_usage()
m = ModularSymbols(501,2).decomposition(3)
del m; ModularSymbols_clear_cache()
....:
971.3828125
1052.734375
...
1087.4140625
...
1087.4140625
1087.671875
...
1087.1484375
sage: gc.collect()
11973
sage: gc.collect()
317
sage: gc.collect()
0
sage: objgraph.show_growth(limit=20)
tuple 12128 +1897
function 28505 +1739
dict 10148 +1553
list 5303 +983
Rational 823 +794
ManinSymbol 785 +785 <-----
weakref 5481 +629
wrapper_descriptor 4367 +427
Vector_rational_dense 336 +336
KeyedRef 939 +280
method_descriptor 6516 +225
cell 1556 +209
getset_descriptor 2836 +202
builtin_function_or_method 2610 +188
MonoDictEraser 446 +183
MonoDict 446 +183
staticmethod 739 +134
FormalSum 113 +113
ModularSymbolsElement 113 +113 <-----
instance 215 +106
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/620#comment:9>
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/groups/opt_out.