allocation functions

Kevin Ryde
Thu, 19 Dec 2002 07:14:12 +1000

Torbjorn Granlund <> writes:
> Kevin Ryde <> writes:
>   Yes, the pointers __gmp_allocate_function etc should be used.
> Should they?  I think these were for internal use only.

Sorry, yes, I was thinking this was for mpfr, which gets a bit closer
than a normal application :-).

> In the future, non-documented GMP names might not be
> accessible from user code.

Yes, per other message I think we can get those declarations out of
gmp.h for a start.

> If a user have changed the functions, by means of
> mp_set_memory_functions, the supplied `free' functions must
> be used.

I guess third party libraries, or other self contained modules, could
benefit from an mp_get_memory_functions, so they can find the right
free function without knowing what "main()" is going to setup.