19 #ifndef GRPC_SUPPORT_ALLOC_H 20 #define GRPC_SUPPORT_ALLOC_H 31 void* (*malloc_fn)(
size_t size);
32 void* (*zalloc_fn)(
size_t size);
33 void* (*realloc_fn)(
void* ptr,
size_t size);
struct gpr_allocation_functions gpr_allocation_functions
GPRAPI void gpr_free_aligned(void *ptr)
free memory allocated by gpr_malloc_aligned
GPRAPI void * gpr_malloc_aligned(size_t size, size_t alignment)
aligned malloc, never returns NULL, will align to alignment, which must be a power of 2...
GPRAPI void gpr_free(void *ptr)
free
void(* free_fn)(void *ptr)
Definition: alloc.h:34
GPRAPI gpr_allocation_functions gpr_get_allocation_functions(void)
Return the family of allocation functions currently in effect.
GPRAPI void * gpr_realloc(void *p, size_t size)
realloc, never returns NULL
GPRAPI void * gpr_zalloc(size_t size)
like malloc, but zero all bytes before returning them
GPRAPI void gpr_set_allocation_functions(gpr_allocation_functions functions)
Request the family of allocation functions in functions be used.
GPRAPI void * gpr_malloc(size_t size)
malloc.