libgit2

git_allocator

Version:

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.

Signature

typedef struct git_allocator { void *(*)(size_t, const char *, int) gmalloc void *(*)(size_t, size_t, const char *, int) gcalloc char *(*)(const char *, const char *, int) gstrdup char *(*)(const char *, size_t, const char *, int) gstrndup char *(*)(const char *, size_t, const char *, int) gsubstrdup void *(*)(void *, size_t, const char *, int) grealloc void *(*)(void *, size_t, size_t, const char *, int) greallocarray void *(*)(size_t, size_t, const char *, int) gmallocarray void (*)(void *) gfree };

Members

void *(*)(size_t, const char *, int)
gmalloc
void *(*)(size_t, size_t, const char *, int)
gcalloc
char *(*)(const char *, const char *, int)
gstrdup
char *(*)(const char *, size_t, const char *, int)
gstrndup
char *(*)(const char *, size_t, const char *, int)
gsubstrdup
void *(*)(void *, size_t, const char *, int)
grealloc
void *(*)(void *, size_t, size_t, const char *, int)
greallocarray
void *(*)(size_t, size_t, const char *, int)
gmallocarray
void (*)(void *)
gfree

Parameter To

Versions