protobuf-c 1.5.1
Protocol Buffers implementation in C
ProtobufCAllocator Struct Reference

Structure for defining a custom memory allocator. More...

Data Fields

void *(* alloc )(void *allocator_data, size_t size)
 Function to allocate memory.
 
void(* free )(void *allocator_data, void *pointer)
 Function to free memory.
 
void * allocator_data
 Opaque pointer passed to alloc and free functions.
 

Detailed Description

Structure for defining a custom memory allocator.

Field Documentation

◆ alloc

void *(* ProtobufCAllocator::alloc) (void *allocator_data, size_t size)

Function to allocate memory.

◆ free

void(* ProtobufCAllocator::free) (void *allocator_data, void *pointer)

Function to free memory.

◆ allocator_data

void* ProtobufCAllocator::allocator_data

Opaque pointer passed to alloc and free functions.