File: mp_get_memory_functions.c

package info (click to toggle)
isl 0.20-2
  • links: PTS
  • area: main
  • in suites: buster, sid
  • size: 12,708 kB
  • sloc: ansic: 125,702; python: 5,770; sh: 4,291; cpp: 1,057; makefile: 497; lisp: 54; perl: 9
file content (14 lines) | stat: -rw-r--r-- 373 bytes parent folder | download | duplicates (33)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <gmp.h>

void mp_get_memory_functions(
		void *(**alloc_func_ptr) (size_t),
		void *(**realloc_func_ptr) (void *, size_t, size_t),
		void (**free_func_ptr) (void *, size_t))
{
	if (alloc_func_ptr)
		*alloc_func_ptr = __gmp_allocate_func;
	if (realloc_func_ptr)
		*realloc_func_ptr = __gmp_reallocate_func;
	if (free_func_ptr)
		*free_func_ptr = __gmp_free_func;
}