TCPIP_STACK_HEAP_CONFIG Structure

C

typedef struct {
TCPIP_STACK_HEAP_TYPE heapType;
TCPIP_STACK_HEAP_FLAGS heapFlags;
TCPIP_STACK_HEAP_USAGE heapUsage;
void* (* malloc_fnc)(size_t bytes);
void* (* calloc_fnc)(size_t nElems, size_t elemSize);
void (* free_fnc)(void* ptr);
} TCPIP_STACK_HEAP_CONFIG;

Description

TCP/IP heap configuration data.

This data type defines the data required to intialize the TCP/IP stack heap.

Members

MembersDescription
heapTypeType of this heap: TCPIP_STACK_HEAP_TYPE_INTERNAL_HEAP, TCPIP_STACK_HEAP_TYPE_EXTERNAL_HEAP, etc.
heapFlagsHeap creation flags.
heapUsageThe usage intended for.
(* malloc_fnc)(size_t bytes)Malloc style allocation function.
(* calloc_fnc)(size_t nElems, size_t elemSize)Calloc style allocation function.
(* free_fnc)(void* ptr)Free style allocation function.

Remarks

The TCPIP_STACK_HEAP_FLAG_ALLOC_UNCACHED heap flag will be internally set as needed.

The heapUsage field is currently not used but it's reserved for further development.

The malloc_fnc/calloc_fnc/free_fnc are used to allocate the heap objects themselves plus the actual heap space (for internal and pool heap types). For the external heap type these functions are directly used to perform the memory allocation operations.