#4639: bad memory leak with exponentiation
------------------------------+---------------------------------------------
 Reporter:  bober             |       Owner:  somebody
     Type:  defect            |      Status:  new     
 Priority:  critical          |   Milestone:          
Component:  basic arithmetic  |    Keywords:          
------------------------------+---------------------------------------------
 I think that the following example speaks for itself. (This was on an x86,
 32 bit, running Ubuntu.)

 Also, I believe that these examples had no problems in sage 3.0.2.

 {{{
 [EMAIL PROTECTED]:~/math/tests$ sage
 ----------------------------------------------------------------------
 | Sage Version 3.2, Release Date: 2008-11-20                         |
 | Type notebook() for the GUI, and license() for information.        |
 ----------------------------------------------------------------------

 sage: get_memory_usage()
 114.5546875
 sage: for z in xrange(10000):
    ...:     a = 3^i
    ...:
 sage: get_memory_usage()
 121.4375
 sage: for z in xrange(10000):
     a = 3^CC.0
    ...:
 sage: get_memory_usage()
 128.96484375
 sage: for z in xrange(10000):
     a = 3.0^CC.0
    ...:
 sage: get_memory_usage()
 187.36328125
 sage: var('t')
 t
 sage: for z in xrange(10000):
     a = 3.0^t
    ....:
 sage: get_memory_usage()
 231.4609375
 sage: #But, integer^integer is OK:
 sage: for z in xrange(10000):
     a = 3^3
    ....:
 sage: get_memory_usage
 <function get_memory_usage at 0x8415f0c>
 sage: get_memory_usage()
 231.58984375
 sage: for z in xrange(10000):
     a = 3^3
    ....:
 sage: get_memory_usage()
 231.58984375
 sage: for z in xrange(10000):
     a = 3.0^CC.0
    ....:
 saget_memory_usage()
 290.1640625
 sage: for z in xrange(10000):
     a = CC.0^CC.0
    ....:
 sage: get_memory_usage()
 290.1640625
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4639>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to