#8904: libsingular: memory leak in Matrix.act_on_polynomial
-------------------------+--------------------------------------------------
   Reporter:  SimonKing  |       Owner:  tbd                                  
       Type:  defect     |      Status:  new                                  
   Priority:  major      |   Milestone:  sage-4.4.2                           
  Component:  memleak    |    Keywords:  libsingular act_on_polynomial memleak
     Author:             |    Upstream:  N/A                                  
   Reviewer:             |      Merged:                                       
Work_issues:             |  
-------------------------+--------------------------------------------------
 There is a memory leak that occurs when mapping a multivariate polynomial
 using a matrix:
 {{{
 sage: R.<a,b>  =  QQ[]
 sage: M = Matrix([[0,1],[1,0]])
 sage: n = 0
 sage: p = R.random_element()
 sage: q = M.act_on_polynomial(p)
 sage: mem = get_memory_usage()
 sage: while(1):
 ....:     n+=1
 ....:     q = M.act_on_polynomial(p)
 ....:     if get_memory_usage()>mem:
 ....:         mem = get_memory_usage()
 ....:         print mem,n
 ....:
 801.04296875 2
 801.54296875 2011
 802.04296875 4738
 802.54296875 7406
 803.04296875 10091
 803.54296875 12809
 804.04296875 15495
 804.54296875 18171
 805.04296875 20873
 805.54296875 23561
 806.04296875 26251
 ...
 }}}

 This does not occur if one maps the polynomial by a proper morphism:
 {{{
 sage: f = R.hom([M.act_on_polynomial(t) for t in R.gens()],R)
 sage: while(1):
 ....:     n+=1
 ....:     q = f(p)
 ....:     if get_memory_usage()>mem:
 ....:         mem = get_memory_usage()
 ....:         print mem,n
 ....:
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8904>
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.

Reply via email to