CToon C 0.6.1
A C99 TOON/JSON serialization library
Loading...
Searching...
No Matches
ctoon_alc Struct Reference

#include <ctoon.h>

Data Fields

void *(* malloc )(void *ctx, size_t size)
 
void *(* realloc )(void *ctx, void *ptr, size_t old_size, size_t size)
 
void(* free )(void *ctx, void *ptr)
 
void * ctx
 

Detailed Description

A memory allocator.

Typically you don't need to use it, unless you want to customize your own memory allocator.

Definition at line 588 of file ctoon.h.

Field Documentation

◆ ctx

void* ctoon_alc::ctx

A context for malloc/realloc/free, can be NULL.

Definition at line 596 of file ctoon.h.

◆ free

void(* ctoon_alc::free) (void *ctx, void *ptr)

Same as libc's free(ptr), should not be NULL.

Definition at line 594 of file ctoon.h.

◆ malloc

void *(* ctoon_alc::malloc) (void *ctx, size_t size)

Same as libc's malloc(size), should not be NULL.

Definition at line 590 of file ctoon.h.

◆ realloc

void *(* ctoon_alc::realloc) (void *ctx, void *ptr, size_t old_size, size_t size)

Same as libc's realloc(ptr, size), should not be NULL.

Definition at line 592 of file ctoon.h.


The documentation for this struct was generated from the following file: