#18905: fix more leaks found in #18897
-------------------------------------+-------------------------------------
Reporter: dimpase | Owner:
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.8
Component: memleak | Resolution:
Keywords: | Merged in:
Authors: Simon King | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/SimonKing/memleak_for_integer_mod_rel_14058|
3ada19d1acf58d1d085c1908b3058de8377901a4
Dependencies: #18897, #14058 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by slabbe):
Replying to [comment:43 slabbe]:
> because I don't see those instances with multiple of one hundred
anymore on sage-6.9.rc0.
Sorry, I am retracting here as I do see them on sage-6.9.rc0:
{{{
sage: L = [1,1,0,1,0,1,2,1,1,0,0,1,2,0,0,1,1,0,2,0,0,0,0,0,1]
sage: %cpaste
Pasting code; enter '--' alone on the line to stop or use Ctrl-D.
:sage: def test_mod_100(L, dim):
:....: 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()
:....: post=Counter(type(o) for o in gc.get_objects() if id(o) not in
pre)
:....: return [(k,v) for (k,v) in post.iteritems() if v%100==0]
:--
sage: test_mod_100(L, 5)
[(<class
'sage.rings.algebraic_closure_finite_field.AlgebraicClosureFiniteField_pseudo_conway_with_category'>,
100),
(<class 'sage.rings.homset.RingHomset_generic_with_category'>, 100),
(<class
'sage.rings.finite_rings.conway_polynomials.PseudoConwayLattice'>, 100),
(<type 'sage.rings.finite_rings.integer_mod.Int_to_IntegerMod'>, 200),
(<type 'sage.rings.finite_rings.integer_mod.NativeIntStruct'>, 100),
(<class
'sage.rings.finite_rings.finite_field_prime_modn.FiniteField_prime_modn_with_category'>,
100),
(<type 'sage.categories.map.FormalCompositeMap'>, 200),
(<type
'sage.rings.polynomial.polynomial_element.PolynomialBaseringInjection'>,
200),
(<class 'sage.rings.ideal.Ideal_pid'>, 100),
(<class 'sage.rings.homset.RingHomset_quo_ring_with_category'>, 100)]
}}}
and they do disappear with this ticket on top on sage-6.9.rc0:
{{{
sage: test_mod_100(L, 5)
[]
}}}
That being said, I do see some stuff on the second, third, fourth
execution of `test(L, 5)`:
{{{
sage: test(L, 5)
[(<type 'tuple'>, 5198),
(<class
'sage.rings.algebraic_closure_finite_field.AlgebraicClosureFiniteField_pseudo_conway_with_category.element_class'>,
101),
(<type
'sage.rings.finite_rings.element_givaro.FiniteField_givaroElement'>,
194),
(<type
'sage.rings.finite_rings.element_pari_ffelt.FiniteFieldElement_pari_ffelt'>,
1104),
(<type 'dict'>, 102)]
}}}
Is this problematic?
--
Ticket URL: <http://trac.sagemath.org/ticket/18905#comment:44>
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.