#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):
I dived a bit deeper into the source code to see what is actually going on
and I found that in the end the symbolic ring sqrt function is the one
where things go wrong. It's not the general symbolic ring framework since
other symbolic ring functions dont misbehave.
{{{
functions=['arccos', 'arccosh',
'arcsin', 'arcsinh', 'arctan', 'arctanh', 'cos', 'cosh', 'exp', 'log',
'sin', 'sinh', 'sqrt', 'tan', 'tanh']
for function in functions:
print function
a=SR(2)
m = get_memory_usage()
for i in xrange(10000):
b=a.__getattribute__(function)()
print get_memory_usage(m)
}}}
arccos
0.0
arccosh
0.0
arcsin
0.0
arcsinh
0.0
arctan
0.0
arctanh
0.0
cos
0.0
cosh
0.0
exp
0.0
log
0.0
sin
0.0
sinh
0.0
sqrt
7.03125
tan
0.0
tanh
0.0
I'm not able to figure out which code get's called from the symbolic ring
part on, since the internal working of the symbolic ring is a bit to
complex for me.
Ie. the source code of SR(2).sqrt is
{{{
return new_Expression_from_GEx(self._parent,
g_hold2_wrapper(g_power_construct, self._gobj, g_ex1_2,
hold))
}}}
And new_Expression_from_GEx doesn't have any documentation or whatsoever.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9129#comment:13>
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.