Integer.sqrt() memory leak?

15 views
Skip to first unread message

rickhg12hs

unread,
May 27, 2010, 12:07:24 PM5/27/10
to sage-support
I noticed that doing sqrt() for large integers seems to continually
chew up memory.

For example:

sage: m = get_memory_usage()
sage: while True:
a = ZZ(randint(2^400,2^800)).sqrt()
print get_memory_usage(m)

This prints ever increasing memory usage values, but I'm not sure that
it should.

Robert Bradshaw

unread,
May 27, 2010, 12:43:29 PM5/27/10
to sage-s...@googlegroups.com

Looks like a memory leak to me.

- Robert


rickhg12hs

unread,
May 29, 2010, 8:08:57 PM5/29/10
to sage-support
The source code for Integer.sqrt() calls some lower level stuff that
I'm not familiar with, otherwise I'd try to fix it. Should I submit a
bug report? Can I even do that?

Thanks,
Richard

On May 27, 12:43 pm, Robert Bradshaw <rober...@math.washington.edu>
wrote:
Reply all
Reply to author
Forward
0 new messages