The following piece of code also seems to leak memory.
The problem seems to occur while resolving the action of ZZ on E.

sage: K = GF(1<<55,'t')
sage: a = K.random_element()
sage: while 1:
....:     E = EllipticCurve(j=a); P = E.random_point(); 2*P;


On 16 juin, 02:51, Jean-Pierre Flori <jpfl...@gmail.com> wrote:
> this is now 11495
>
> On 16 juin, 02:46, Jean-Pierre Flori <jpfl...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Ok so the memleak comes from ZZ_pE_to_ZZ_pX in
> > c_lib/src/ntl_wrap.cpp
> > It should have been fixed by trac #1092, but has been reverted by
> > commit 8503.
> > I'll reopen #1092.
> > On 16 juin, 02:07, Jean-Pierre Flori <jpfl...@gmail.com> wrote:
>
> > > and from ZZ_pE_c_to_list function
>
> > > On 16 juin, 01:18, Jean-Pierre Flori <jpfl...@gmail.com> wrote:
>
> > > > Which seems to come from list() method.
>
> > > > On 16 juin, 00:09, Jean-Pierre Flori <jpfl...@gmail.com> wrote:
>
> > > > > I finally found the memleak in different si2sa_* functions in
> > > > > sage.libs.singular.singular and provided a fix on Trac.
>
> > > > > On 15 juin, 21:50, Jean-Pierre Flori <jpfl...@gmail.com> wrote:
>
> > > > > > S the memleak seems to be located within creation or rather coercing
> > > > > > to MPolynomial_libsingular.
> > > > > > Calling gc.collect() whithin the loop seem to fix or are least
> > > > > > attenuate the problem.
> > > > > > However, calling afterwards does not free memory back.
>
> > > > > > On 15 juin, 14:29, Jean-Pierre Flori <jpfl...@gmail.com> wrote:
>
> > > > > > > Thanks a lot, I'll have a look at that.
>
> > > > > > > On 15 juin, 14:26, Alastair Irving <alastair.irv...@sjc.ox.ac.uk>
> > > > > > > wrote:
>
> > > > > > > > On 14/06/2011 21:58, Jean-Pierre Flori wrote:
>
> > > > > > > > > On 14 juin, 08:44, Simon King<simon.k...@uni-jena.de>  wrote:
> > > > > > > > >> Since sage-nt seems to agree that it is a bug, I opened trac 
> > > > > > > > >> ticket
> > > > > > > > >> #11474.
> > > > > > > > > Good !
>
> > > > > > > > > About the original memleak, I tried looking at how
> > > > > > > > > EllipticCurves_finite_field (maybe not correct name) are 
> > > > > > > > > created but
> > > > > > > > > could not find anything fishy, only Python code which should 
> > > > > > > > > not
> > > > > > > > > produce any memleak.
>
> > > > > > > > Hi
>
> > > > > > > > I think this is a problem with multivariate polynomials over 
> > > > > > > > finite
> > > > > > > > fields and is not specific to elliptic curves.  The following 
> > > > > > > > code
> > > > > > > > produces a leak:
>
> > > > > > > > K=GF(2^50,"t")
> > > > > > > > R.<x,y>=PolynomialRing(K)
> > > > > > > > a=K.random_element()
> > > > > > > > while(1):
> > > > > > > >      f=a*x
> > > > > > > >      del f
>
> > > > > > > > When constructing an elliptic curve its equation is constructed 
> > > > > > > > in the
> > > > > > > > 3-variable polynomial ring over K, and thus we will get this 
> > > > > > > > leak.
>
> > > > > > > > Best wishes
>
> > > > > > > > Alastair

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to