#include "stdalloc.h"
static void *stdalloc__malloc(size_t len, const char *file, int line)
{
GIT_UNUSED(file);
GIT_UNUSED(line);
return malloc(len);
}
static void *stdalloc__realloc(void *ptr, size_t size, const char *file, int line)
{
GIT_UNUSED(file);
GIT_UNUSED(line);
return realloc(ptr, size);
}
static void stdalloc__free(void *ptr)
{
free(ptr);
}
int git_stdalloc_init_allocator(git_allocator *allocator)
{
allocator->gmalloc = stdalloc__malloc;
allocator->grealloc = stdalloc__realloc;
allocator->gfree = stdalloc__free;
return 0;
}