Next: Compatibility With MPF, Previous: Exception Related Functions, Up: MPFR Interface [Index]
These are general functions concerning memory handling (see Memory Handling, for more information).
Free all caches and pools used by MPFR internally (those local to the
current thread and those shared by all threads).
You should call this function before terminating a thread, even if you did
not call mpfr_const_*
functions directly (they could have been called
internally).
Free various caches and pools used by MPFR internally, as specified by way, which is a set of flags:
MPFR_FREE_LOCAL_CACHE
is set;
MPFR_FREE_GLOBAL_CACHE
is set.
The other bits of way are currently ignored and are reserved for future use; they should be zero.
Note: mpfr_free_cache2 (MPFR_FREE_LOCAL_CACHE | MPFR_FREE_GLOBAL_CACHE)
is currently equivalent to mpfr_free_cache()
.
Free the pools used by MPFR internally.
Note: This function is automatically called after the thread-local caches
are freed (with mpfr_free_cache
or mpfr_free_cache2
).
This function should be called before calling mp_set_memory_functions
.
See Memory Handling, for more information.
Zero is returned in case of success, non-zero in case of error.
Errors are currently not possible, but checking the return value
is recommended for future compatibility.