#13875: Test memory allocation in distances_all_pairs
---------------------------------+------------------------------------------
       Reporter:  dcoudert       |         Owner:  jason, ncohen, rlm
           Type:  enhancement    |        Status:  needs_review      
       Priority:  major          |     Milestone:  sage-5.6          
      Component:  graph theory   |    Resolution:                    
       Keywords:                 |   Work issues:                    
Report Upstream:  N/A            |     Reviewers:                    
        Authors:  David Coudert  |     Merged in:                    
   Dependencies:  #13808         |      Stopgaps:                    
---------------------------------+------------------------------------------
Changes (by dcoudert):

  * status:  needs_work => needs_review


Comment:

 > You cannot do things like `if distances==NULL or predecessor==NULL:` and
 raise an exception in that case. If distances has been allocated and
 predecessor hasn't, then an exception is raised before `distances` is
 freed.

 done.

 > Besides, I expect this patch to be incompatible with your hyperbolicity
 patch. This ticket should depend on #13808 !

 No, this ticket is hopefully independent on the hyperbolicity patch.
 Furthermore, it don't change the behavior of the hyperbolicity patch. I
 have tested all possible combinations and I have no conflicts.

 > Oh. And I am not sure that it is wise to return as a message "Not enough
 space". Sometimes there is sufficient memory available, but not a
 contiguous segment as long as you need it to be. In such cases there is
 sufficient memory, just not allocated as it should. Something like `raise
 MemoryError()` is ok I guess.

 done.

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