gmp_libmp_get_memory_functions Method |
Namespace: Math.Gmp.Native
public static void mp_get_memory_functions( ref allocate_function alloc_func_ptr, ref reallocate_function realloc_func_ptr, ref free_function free_func_ptr )
Public Shared Sub mp_get_memory_functions ( ByRef alloc_func_ptr As allocate_function, ByRef realloc_func_ptr As reallocate_function, ByRef free_func_ptr As free_function )
public: static void mp_get_memory_functions( allocate_function^% alloc_func_ptr, reallocate_function^% realloc_func_ptr, free_function^% free_func_ptr )
static member mp_get_memory_functions : alloc_func_ptr : allocate_function byref * realloc_func_ptr : reallocate_function byref * free_func_ptr : free_function byref -> unit
allocate_function allocate; reallocate_function reallocate; free_function free; // Retrieve the GMP memory allocation functions. allocate = null; reallocate = null; free = null; gmp_lib.mp_get_memory_functions(ref allocate, ref reallocate, ref free); Assert.IsTrue(allocate != null && reallocate != null && free != null); // Allocate and free memory. void_ptr p = allocate(100); free(p, 100);
Dim allocate As allocate_function Dim reallocate As reallocate_function Dim free As free_function ' Retrieve the GMP memory allocation functions. allocate = Nothing reallocate = Nothing free = Nothing gmp_lib.mp_get_memory_functions(allocate, reallocate, free) Assert.IsTrue(allocate IsNot Nothing AndAlso reallocate IsNot Nothing AndAlso free IsNot Nothing) ' Allocate and free memory. Dim p As void_ptr = allocate(100) free(p, 100)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.