RttcpipQueryStackHeapUsage

RttcpipQueryStackHeapUsage retrieves heap usage information for the TCP/IP Stack.

Syntax

Copy
BOOL RttcpipQueryStackHeapUsage(
    PULONG pUsedBytes,
    PULONG pRecycledBytes,
);

Parameters

pUsedBytes

A pointer to a ULONG to return the number of bytes allocated by the TCP/IP Stack.

pRecycledBytes

A pointer to a ULONG to return the number of bytes recycled by the TCP/IP Stack.

Return Value

If this function succeeds, it returns TRUE. If this function fails, it returns FALSE. Call GetLastError for information on failure. The possible error codes are:

Error code Meaning

WSAEINVAL

The pointer argument is NULL.

WSASYSNOTREADY

The TCP/IP Stack has not initialized.

Remarks

When the TCP/IP Stack fails to allocate memory, it frees the recycled memory and attempts the allocation again.

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

RttcpipApi.h

RtTcpipApi.lib