File src/yajl_alloc.c

default memory allocation routines for yajl which use malloc(3), realloc(3), and free(3)


Included Files


Global Function yajl_set_default_alloc_funcs()

Set the allocator function pointers in <yaf> to private functions which call the default malloc(3), realloc(3), and free(3) functions.

void yajl_set_default_alloc_funcs ( yajl_alloc_funcs* yaf )

Prototyped in: src/yajl_alloc.h
Called by: yajl_alloc() src/yajl.c
  yajl_gen_alloc() src/yajl_gen.c
References Functions: yajl_internal_free() src/yajl_alloc.c
  yajl_internal_malloc() src/yajl_alloc.c
  yajl_internal_realloc() src/yajl_alloc.c

Local Function yajl_internal_free()

a private wrapper around free(3)

static void yajl_internal_free ( void* ctx, void* ptr )

Calls: free()
Used in: yajl_set_default_alloc_funcs() src/yajl_alloc.c

Local Function yajl_internal_malloc()

a private wrapper around malloc(3)

static void* yajl_internal_malloc ( void* ctx, size_t sz )

Calls: malloc()
Used in: yajl_set_default_alloc_funcs() src/yajl_alloc.c

Local Function yajl_internal_realloc()

a private wrapper around realloc(3)

static void* yajl_internal_realloc ( void* ctx, void* previous, size_t sz )

Calls: realloc()
Used in: yajl_set_default_alloc_funcs() src/yajl_alloc.c