Share via


NdisFreeMemory (Windows Embedded CE 6.0)

1/6/2010

This function releases a block of memory previously allocated with the NdisAllocateMemory function.

Syntax

VOID NdisFreeMemory(
  PVOID VirtualAddress,
  UINT Length,
  UINT MemoryFlags
);

Parameters

  • VirtualAddress
    [in] Pointer to the base virtual address of the allocated memory. This address was returned by the NdisAllocateMemory function.
  • Length
    [in] Specifies the size, in bytes, of the memory block to be released. This parameter must be identical to the Length that was passed to NdisAllocateMemory.
  • MemoryFlags
    [in] Specifies 0 or the bitmask originally passed to NdisAllocateMemory for the preceding range. The following table shows valid memory flag values.

    Value Description

    0

    System-space memory.

    NDIS_MEMORY_CONTIGUOUS

    Not supported.

    NDIS_MEMORY_NONCACHED

    Noncached memory.

    This value must be identical to the MemoryFlags parameter that was passed to NdisAllocateMemory.

Return Value

None.

Remarks

The parameters passed to this function must be identical to those passed to NdisAllocateMemory when the block of memory was allocated. That is, a caller of this function cannot release a sub-range of the block that was allocated.

Requirements

Header ndis.h
Library ndis.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

NDIS Library Functions
NdisAllocateMemory