[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GMP does not check for memory allocation failures
From: |
Torbjorn Granlund |
Subject: |
Re: GMP does not check for memory allocation failures |
Date: |
11 Feb 2002 20:05:22 +0100 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 |
Matt Carter <address@hidden> writes:
I noticed that GMP doesn't check for failed memory allocations.
That is not true. It is done in memory.c (__gmp_default_allocate,
__gmp_default_reallocate).
If you replace these functions (by means of mp_set_memory_functions)
with non-checking functions, then you statement might become true, but
then that's the choice of the user.
(It is a different matter that GMP can run of out stack space, and
like any other C program, that is a condition one cannot easily check
for.)
--
Torbjörn