summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-08-21 09:40:40 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-08-21 09:40:40 +0000
commitc406042241051b3a2eeac79f0462fa2b90da28da (patch)
tree8b1748bf1a867a246499a73200c4d44cd10b87a5
parent60139bdbbac43b8d5cc0dd7a5ee2a6edb2bdfa88 (diff)
downloadmpfr-c406042241051b3a2eeac79f0462fa2b90da28da.tar.gz
[doc/mpfr.texi] Added a paragraph about memory allocation by MPFR.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11631 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--doc/mpfr.texi17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/mpfr.texi b/doc/mpfr.texi
index 368086afe..f302c29ea 100644
--- a/doc/mpfr.texi
+++ b/doc/mpfr.texi
@@ -943,6 +943,23 @@ with an implementation-defined TLS specifier).
@c is just a GCC extension. There is currently no clear documentation
@c about TLS variable initialization.
+By default, MPFR currently uses the GMP memory allocators
+@ifinfo
+(@pxref{Custom Allocation,,, gmp.info,GNU MP})
+@end ifinfo
+@ifnotinfo
+(see Section ``Custom Allocation'' in @cite{GNU MP})
+@end ifnotinfo
+instead of @code{malloc} for all its allocations. But since caches have
+been introduced in MPFR and nothing had been documented about necessary
+clean-up if the GMP allocators had to be changed (by the application or
+another library), the current GMP allocators are memorized the first
+time they are used by MPFR, and MPFR will always use these allocators.
+This means that the allocators need to remain valid as long as MPFR is
+used. To avoid this requirement, MPFR 4 will handle memory allocation
+differently, and applications that change the allocators may have to be
+slightly modified.
+
@node MPFR Interface, API Compatibility, MPFR Basics, Top
@comment node-name, next, previous, up
@chapter MPFR Interface