1 | #include <gmp.h> |
---|---|
2 | |
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)) |
7 | { |
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; |
14 | } |
15 |