Merge pull request #3 from skimo-openhub/skimo/pr/distclean
[polylib.git] / mp_get_memory_functions.c
blob1b5636d8ed11b6b5f3148cc4abc07964c0060900
1 #include <gmp.h>
3 void mp_get_memory_functions(
4 void *(**alloc_func_ptr) (size_t),
5 void *(**realloc_func_ptr) (void *, size_t, size_t),
6 void (**free_func_ptr) (void *, size_t))
8 if (alloc_func_ptr)
9 *alloc_func_ptr = __gmp_allocate_func;
10 if (realloc_func_ptr)
11 *realloc_func_ptr = __gmp_reallocate_func;
12 if (free_func_ptr)
13 *free_func_ptr = __gmp_free_func;