Share via


NdisFreeMemory

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

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

Parameters

  • VirtualAddress
    Pointer to the base virtual address of the allocated memory. This address was returned by the NdisAllocateMemory function.

  • Length
    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
    Specifies 0 or the bitmask originally passed to NdisAllocateMemory for the preceding range; one of the following:

    Value Description
    0 Nonpaged system-space memory.
    NDIS_MEMORY_CONTIGUOUS Physically contiguous memory.
    NDIS_MEMORY_NONCACHED Noncached memory.

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

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 subrange of the block that was allocated.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Ndis.h   Ndislib.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

NdisAllocateMemory

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.