summaryrefslogtreecommitdiff
path: root/tests/mpfr-test.h
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-08-30 07:21:07 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-08-30 07:21:07 +0000
commit635d98d9b7b2d95b6391b09db5e2ecf6ad3dfd7f (patch)
tree30c94de1b3f79a2a93ae3e4da18705210f7b89d3 /tests/mpfr-test.h
parent3fe13fdebfc247cb10a2fd6ba64157e1b50b4cc4 (diff)
downloadmpfr-635d98d9b7b2d95b6391b09db5e2ecf6ad3dfd7f.tar.gz
[tests] Define global variable tests_memory_disabled, which needs to
be set when the memory.c allocators (to track memory leaks) must not be used; i.e., setting it disables the calls to tests_memory_start() and tests_memory_end(). In tests.c, it is initialized to 0 (unset), except when mini-gmp is used (same behavior as before this commit). Programs that test GMP's mp_set_memory_functions() need to set this variable before calling tests_start_mpfr(). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10764 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/mpfr-test.h')
-rw-r--r--tests/mpfr-test.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/mpfr-test.h b/tests/mpfr-test.h
index 616ef4119..2289db65f 100644
--- a/tests/mpfr-test.h
+++ b/tests/mpfr-test.h
@@ -207,7 +207,8 @@ extern gmp_randstate_t mpfr_rands;
typedef __gmp_randstate_struct *mpfr_gmp_randstate_ptr;
-/* Allocation */
+/* Memory Allocation */
+extern int tests_memory_disabled;
void *tests_allocate (size_t);
void *tests_reallocate (void *, size_t, size_t);
void tests_free (void *, size_t);