An instance for a custom memory allocator
Setting the pointers of this structure allows the developer to implement
custom memory allocators. The global memory allocator can be set by using
"GIT_OPT_SET_ALLOCATOR" with the git_libgit2_opts
function. Keep in mind
that all fields need to be set to a proper function.
Allocate n
bytes of memory
This function shall deallocate the old object ptr
and return a pointer to a new object that has the size specified by size
. In case ptr
is NULL
, a new array shall be allocated.
This function shall free the memory pointed to by ptr
. In case ptr
is NULL
, this shall be a no-op.