#715: Parents probably not reclaimed due to too much caching
------------------------+---------------------------------------------------
   Reporter:  robertwb  |          Owner:  somebody           
       Type:  defect    |         Status:  needs_review       
   Priority:  major     |      Milestone:  sage-4.8           
  Component:  coercion  |       Keywords:  weak cache coercion
Work_issues:            |       Upstream:  N/A                
   Reviewer:            |         Author:  Simon King         
     Merged:            |   Dependencies:  #9138, #11900      
------------------------+---------------------------------------------------

Comment(by SimonKing):

 Here some remarks on the new patch:

 I use `TripleDictById` for storing actions, since otherwise we have
 trouble with non-unique parents and get segfaults.

 In addition, I do not directly store the action but only a weak reference
 to it, since otherwise I couldn't fix the memory leak.

 Sometimes, the stored action is in fact `None`, for which we can't use a
 weak references. Instead, I use a constant function. For technical reasons
 it returns False and not None (namely, this is to avoid confusion with a
 weak reference that has become invalid).

 '''__Features__'''

  * The segfault in `sage -t sage/modular/modsym/space.py` is gone.
  * The time for executing that test remains fine, namely 20.7 seconds
 (unpatched sage-5.0.prealpha0) versus 21.4 seconds (with patch).
  * The example from the ticket description does not leak anymore!

 Thus, needs, review.

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