ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 18 Nov 2019 13:45:46 +0100Possible memory leak in polynomial evaluationhttps://ask.sagemath.org/question/48793/possible-memory-leak-in-polynomial-evaluation/ 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?Mon, 18 Nov 2019 13:45:46 +0100https://ask.sagemath.org/question/48793/possible-memory-leak-in-polynomial-evaluation/