#18905: fix more leaks found in #18897
---------------------------+------------------------
Reporter: dimpase | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.8
Component: memleak | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: #18897 | Stopgaps:
---------------------------+------------------------
Comment (by slabbe):
I was also playing with objgraph...
{{{
#!python
def test(L, dim):
import objgraph
import gc
from collections import Counter
gc.collect()
pre={id(c) for c in gc.get_objects()}
m = matrix(dim, L)
for p in range(2,102):
m.change_ring(GF(nth_prime(p))).eigenvalues()
gc.collect()
O = gc.get_objects()
post=Counter(type(o) for o in O if id(o) not in pre)
T = [k for (k,v) in post.iteritems() if v==100]
D = dict((type(o),o) for o in O if type(o) in T)
for i,v in enumerate(sorted(D.values())):
print v
objgraph.show_backrefs(v,filename="test_{}.png".format(i))
print "--"
}}}
I get :
{{{
Principal ideal (547) of Integer Ring
Graph written to /tmp/objgraph-e803N8.dot (20 nodes)
Image generated as test_0.png
--
Set of Homomorphisms from Integer Ring to Finite Field of size 181
Graph written to /tmp/objgraph-I_uL5V.dot (12 nodes)
Image generated as test_1.png
--
<class 'sage.rings.finite_rings.conway_polynomials.PseudoConwayLattice'>
Graph written to /tmp/objgraph-oMuwMY.dot (13 nodes)
Image generated as test_2.png
--
Algebraic closure of Finite Field of size 181
Graph written to /tmp/objgraph-M_9gmt.dot (14 nodes)
Image generated as test_3.png
--
Finite Field of size 547
Graph written to /tmp/objgraph-ZostIO.dot (25 nodes)
Image generated as test_4.png
--
Set of Homomorphisms from Finite Field of size 181 to Univariate
Polynomial Ring in x over Finite Field of size 181
Graph written to /tmp/objgraph-diDGKn.dot (12 nodes)
Image generated as test_5.png
--
<sage.rings.finite_rings.integer_mod.NativeIntStruct object at
0x7f366d1e3590>
Graph written to /tmp/objgraph-JxmEbJ.dot (30 nodes)
Image generated as test_6.png
--
}}}
I will attach test_3.png for the algebraic closure right now.
--
Ticket URL: <http://trac.sagemath.org/ticket/18905#comment:13>
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.