#14625: lrcalc calls exit()
-------------------------------------------------+-------------------------
       Reporter:  thansen                        |        Owner:  jdemeyer
           Type:  defect                         |       Status:  new
       Priority:  major                          |    Milestone:  sage-5.13
      Component:  packages: standard             |   Resolution:
       Keywords:  spkg, library, lrcalc          |    Merged in:
        Authors:                                 |    Reviewers:
Report Upstream:  Reported upstream. Developers  |  Work issues:
  acknowledge bug.                               |       Commit:
         Branch:                                 |     Stopgaps:
   Dependencies:                                 |
-------------------------------------------------+-------------------------

Comment (by zabrocki):

 Another message that Anne forwarded to me relevant to this ticket:

 Hi Anne,

 I did know about that one, and I already did some work on this so that
 the latest version of lrcalc does not call exit (I think). But this
 doesn't really make a difference, at least not under linux.

 Lrcalc calls exit() whenever a call to malloc() returns a zero pointer
 (which means out-of-memory).  But I am told that under linux, malloc()
 NEVER returns zero.  In stead, if the kernel cannot fulfill a request
 for more memory, it simply kills off the program that requests it.  So
 if that is true, it doesn't matter if lrcalc calls exit or not, the
 kernel will still kill the library and the rest of sage if lrcalc ever
 runs out of memory.

 I made some changes to the library that makes it possible to stop in the
 middle of a computation and clean up gracefully, and this could be done
 if lrcalc ever uses "too much" memory.  But the library would need sage
 to tell it exactly how much memory it is allowed to use.  I don't have
 time to get involved with programming sage proper, so somebody else will
 have to figure out a way to determine how much memory can safely be
 consumed.  If somebody can do this, then I should be able to make sure
 that lrcalc will return with an error if that amount of memory is ever
 reached.

 Anders

--
Ticket URL: <http://trac.sagemath.org/ticket/14625#comment:5>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to