TCPIP_STACK_HEAP_TYPE Enumeration

C

typedef enum {
TCPIP_STACK_HEAP_TYPE_NONE = 0,
TCPIP_STACK_HEAP_TYPE_INTERNAL_HEAP,
TCPIP_STACK_HEAP_TYPE_INTERNAL_HEAP_POOL,
TCPIP_STACK_HEAP_TYPE_EXTERNAL_HEAP,
TCPIP_STACK_HEAP_TYPES
} TCPIP_STACK_HEAP_TYPE;

Description

Enumeration: TCPIP_STACK_HEAP_TYPE.

Definition of the heap type which the TCP/IP stack uses for internal allocation. Stack clients could use the type to get access to heap statistics functions.

Preconditions

None.

Members

MembersDescription
TCPIP_STACK_HEAP_TYPE_NONE = 0Invalid, unknown heap type.
TCPIP_STACK_HEAP_TYPE_INTERNAL_HEAPInternally implemented heap. Currently the default heap type. The default internal memory heap consists of blocks of data that are allocated in chunks using a first fit algorithm. Allocation and deallocation operations are reasonably fast. However, the allocation granularity is pretty good. This type of heap can become fragmented over time. There is no data maintained in this heap on a per client basis. What this means is that it is OK to pass the heap handle to other clients (software modules) to use it.
TCPIP_STACK_HEAP_TYPE_INTERNAL_HEAP_POOLInternally implemented pool heap. Very fast allocation and deallocation without fragmentation. However, the allocated chunks are fixed size so it can result in a not very efficient memory usage.
TCPIP_STACK_HEAP_TYPE_EXTERNAL_HEAPExternally maintained heap. The heap is maintained externally and allocation is done using the supplied functions. The TCP/IP stack heap can provide OSAL synchronization protection if needed.
TCPIP_STACK_HEAP_TYPESNumber of supported heap types.

Remarks

New types could be added in the future.