On Nov 5, 12:23 am, Bob Smith <[email protected]> wrote: > Using MPIR 2.4.0, I'm substituting my own memory allocator which gets > called from tal-reent.c in __gmp_tmp_reentrant_alloc. The code in that > function doesn't check to see if the allocation failed and immediately > writes into the memory, allocated or not. > > How should I indicate that the allocation failed so your code and my > code may recover cleanly?
You can't, but the closest you can get is to throw an exception (note that with gcc it may require compiling mpir with -fexceptions). -- You received this message because you are subscribed to the Google Groups "mpir-devel" 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/mpir-devel?hl=en.
