#12215: Memleak in UniqueRepresentation, @cached_method
-----------------------+----------------------------------------------------
   Reporter:  vbraun   |          Owner:  rlm                                   
    
       Type:  defect   |         Status:  new                                   
    
   Priority:  major    |      Milestone:  sage-4.8                              
    
  Component:  memleak  |       Keywords:  UniqueRepresentation cached_method 
caching
Work_issues:           |       Upstream:  N/A                                   
    
   Reviewer:           |         Author:                                        
    
     Merged:           |   Dependencies:  #11115 #11900                         
    
-----------------------+----------------------------------------------------

Comment(by SimonKing):

 There is yet another location where it makes sense to use
 @weak_cached_function: For the cache of dynamic classes!

 Namely, dynamic classes are frequently used in the category framework,
 they have a strong cache, and the parent/element classes keep a pointer to
 the category they belong to. So, that's preventing categories from being
 garbage collected.

 I think that my patches from here, #715, and #11935 (which reduces the
 number of dynamic classes created) might actually be enough to fix the
 problem. When I run
 {{{
 sage: for p in primes(2,1000000):
 ....:     R = GF(p)['x','y','z']
 ....:     print get_memory_usage()
 }}}
 then one initially still sees an increased memory usage. But after a while
 it seems to stabilise.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12215#comment:11>
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