abort on error - is this being addressed?
arndt at jjj.de
Thu Aug 26 11:48:53 CEST 2010
* Allan Chandler <allachan at au1.ibm.com> [Aug 26. 2010 08:45]:
> I've been using GMP as a user for a little while now but I just came
> across a comment on the web from someone who suggests not using it
> GNU MP unconditionally calls abort() on allocation failures,
> which are bound to happen with certain insanely large
> computations. This is unacceptable behaviour for a library and
> reason enough to write your own arbitrary-precision code.
> That was certainly news to me.
This is ill-informed FUD. How many libraries handle OOM gracefully?
Specifically, OOM for GMP just means "cannot proceed". What could
be "acceptable behaviour" has been cunningly left open in the above
I could not find the comment on the web, could you give me pointer?
Of course one can alter the behaviour of the allocator calls
to obtain whatever one considers "acceptable". Writing a new
arbitrary-precision library from scratch instead is an
incredibly dumb approach.
More information about the gmp-devel