Поделиться через


NdisFreeMemory (Compact 2013)

3/26/2014

This function releases a block of memory that was previously allocated with the NdisAllocateMemoryWithTagPriority function.

Syntax

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

Parameters

  • Length
    The size, in bytes, of the memory block to be released. This parameter is ignored.
  • MemoryFlags
    A set of flags that specify the type of memory to free. This value must be zero if the memory was allocated with NdisAllocateMemoryWithTagPriority. NDIS 6.0 always uses NdisAllocateMemoryWithTagPriority.

Return Value

None.

Remarks

Because non-cached memory and contiguous memory are rarely released until the allocating miniport driver is unloading, a caller of NdisFreeMemory usually is running at IRQL = PASSIVE_LEVEL for these types of deallocations. In any case:

  • When releasing contiguous memory, a caller of NdisFreeMemory must be running at IRQL = PASSIVE_LEVEL
  • When releasing non-cached memory, a caller of NdisFreeMemory must be running at IRQL < DISPATCH_LEVEL
  • When releasing memory that is neither contiguous nor non-cached, a caller of NdisFreeMemory must be running at IRQL <= DISPATCH_LEVEL

Requirements

Header

ndis.h

Library

ndis.lib

See Also

Reference

NDIS Memory Interface
MiniportHaltEx
NdisAllocateMemoryWithTagPriority