DIPlib Documentation - ©1995-2014 Quantitative Imaging Group, Delft University of Technology.

MemoryFunctionsSet

Sets memory allocation functions

SYNOPSIS

dip_Error dip_MemoryFunctionsSet( MemoryNewFunction, MemoryReallocateFunction, MemoryFreeFunction )

FUNCTION

Sets the memory allocation functions used by DIPlib.

ARGUMENTS

Data typeNameDescription
dip_MemoryNewFunctionMemoryNewFunctionpointer to a memory allocation function
dip_MemoryReallocateFunctionMemoryReallocateFunctionpointer to a memory reallocation function
dip_MemoryFreeFunctionMemoryFreeFunctionpointer to a memory freeing function

NOTE

The three allocation functions are defined as follows:

typedef void* (*dip_MemoryNewFunction)(size_t size)

typedef void* (*dip_MemoryReallocateFunction)(void *ptr, size_t size)

typedef void (*dip_MemoryFreeFunction)(void *ptr)

And are by default set to malloc, realloc and free.

SEE ALSO

MemoryNew, MemoryReallocate, MemoryFree