#9129: sqrt memory leaks
--------------------------------+-------------------------------------------
Reporter: zimmerma | Owner: AlexGhitza
Type: defect | Status: new
Priority: critical | Milestone: sage-4.6.1
Component: basic arithmetic | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------------+-------------------------------------------
Comment(by mderickx):
The first reported memory leak is still there, but note that you don't
need the extemely large random integers i the example to expose the leak.
All you need is a non square integer.
Doing the example only with squares in the interval 2!^400 till 2!^800:
{{{
m = get_memory_usage()
i=0
while True:
i+=1
a = ZZ(randint(2^200,2^400)^2).sqrt()
if i%1000==0:
print get_memory_usage(m)
}}}
{{{
0.0
0.0
0.0
0.0
}}}
The example using 2 as my favorite non square integer:
{{{
m = get_memory_usage()
i=0
while True:
i+=1
a = 2.sqrt()
if i%1000==0:
print get_memory_usage(m)
}}}
{{{
0.76953125
1.26953125
2.01953125
2.51953125
3.01953125
3.76953125
4.26953125
5.01953125
6.51953125
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9129#comment:12>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.