Possible memory leak in polynomial evaluation [closed]

asked 2019-11-18 13:45:46 +0200

fabio_fc gravatar image

Hello,

if I execute this code in SageMath 8.9

RRR = RealField(prec = 165)
P = PolynomialRing(RRR,'x')
g = P([1..55])
gpi = RRR.pi()
ME = 32
c = 1.5
gamma = 0.5
disk = [cos(2*gpi*i/ME)+I*sin(2*gpi*i/ME) for i in range(ME)]
ellipse = [gamma*(w+c^2/(4*gamma^2)/w) for w in disk]
while (true):
  max([abs(g(x=z)) for z in ellipse])
  print "memory usage: " + str(get_memory_usage())

I see that the memory usage increases as time goes by. On the other hand, if I substitute the expression for ellipse with something like [1..ME], I don't see an increment in memory anymore. Is it a normal behaviour?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Max Alekseyev
close date 2023-09-22 19:20:04.984967

Comments

There is not leak in Sage 10.2.beta1 and so I'm closing this question as outdated.

Max Alekseyev gravatar imageMax Alekseyev ( 2023-09-22 19:19:48 +0200 )edit