Jump to main content

##

# TCPIP_STACK_HEAP_POOL_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);
    uint16_t nPoolEntries;
    TCPIP_STACK_HEAP_POOL_ENTRY * pEntries;
    uint16_t expansionHeapSize;
    } TCPIP_STACK_HEAP_POOL_CONFIG;

## Description

This is structure TCPIP_STACK_HEAP_POOL_CONFIG.

## Preconditions

None.

## Members

Members | Description
--- | ---
heapType | Type of this heap: TCPIP_STACK_HEAP_TYPE_INTERNAL_HEAP_POOL.
heapFlags | Heap creation flags TCPIP_STACK_HEAP_FLAG_ALLOC_UNCACHED will be always internally set.
heapUsage | No used.
(* malloc_fnc)(size_t bytes) | Malloc style function for allocating the pool heap itself.
(* calloc_fnc)(size_t nElems, size_t elemSize) | Calloc style function for allocating the pool heap itself.
(* free_fnc)(void* ptr) | Free style function for releasing the allocated pool heap.
nPoolEntries | Number of pool entries that the pool will contain (this cannot be changed after the creation).
pEntries | Pointer to array of TCPIP_STACK_HEAP_POOL_ENTRY specifying each entry size and blocks.
expansionHeapSize | Size of the heap to be allocated separately and used at run time for allocation of new blocks - in bytes. This is heap space besides the size resulting from the pEntries array. This expansionHeapSize block will be used for allocations on new blocks when an entry runs out of blocks and_nExpBlks_ != 0.