Functions
alloc.cc File Reference
#include <grpc/support/port_platform.h>
#include <stdlib.h>
#include <string.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/lib/profiling/timers.h"
Include dependency graph for alloc.cc:

Go to the source code of this file.

Functions

void gpr_free (void *p)
 
void gpr_free_aligned (void *ptr)
 
void * gpr_malloc (size_t size)
 
void * gpr_malloc_aligned (size_t size, size_t alignment)
 
void * gpr_realloc (void *p, size_t size)
 
void * gpr_zalloc (size_t size)
 

Function Documentation

◆ gpr_free()

void gpr_free ( void *  ptr)

free

Definition at line 51 of file alloc.cc.

◆ gpr_free_aligned()

void gpr_free_aligned ( void *  ptr)

free memory allocated by gpr_malloc_aligned

Definition at line 76 of file alloc.cc.

◆ gpr_malloc()

void* gpr_malloc ( size_t  size)

malloc. If size==0, always returns NULL. Otherwise this function never returns NULL. The pointer returned is suitably aligned for any kind of variable it could contain.

Definition at line 29 of file alloc.cc.

◆ gpr_malloc_aligned()

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.

Definition at line 66 of file alloc.cc.

◆ gpr_realloc()

void* gpr_realloc ( void *  p,
size_t  size 
)

realloc, never returns NULL

Definition at line 56 of file alloc.cc.

◆ gpr_zalloc()

void* gpr_zalloc ( size_t  size)

like malloc, but zero all bytes before returning them

Definition at line 40 of file alloc.cc.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:02