NdisFreeMemoryWithTagPriority

NdisFreeMemoryWithTagPriority function

The NdisFreeMemoryWithTagPriority function releases memory that was allocated with the NdisAllocateMemoryWithTagPriority function.

Syntax


VOID NdisFreeMemoryWithTagPriority(
  _In_ NDIS_HANDLE NdisHandle,
  _In_ PVOID       VirtualAddress,
  _In_ ULONG       Tag
);

Parameters

NdisHandle [in]

An NDIS driver or instance handle that was obtained during caller initialization. This should be the same handle that the driver passed to the NdisAllocateMemoryWithTagPriority function. For example, a miniport driver can use the NDIS handle that it obtained from the NdisMRegisterMiniportDriver or MiniportInitializeEx function. Other NDIS drivers can use the handles from the following functions:

NdisRegisterProtocolDriver

NdisOpenAdapterEx

NdisFRegisterFilterDriver

FilterAttach

VirtualAddress [in]

A pointer to the base virtual address of the allocated memory. This address was returned by the NdisAllocateMemoryWithTagPriority function.

Tag [in]

A string, delimited by single quotation marks, with up to four characters, usually specified in reversed order. The NDIS-supplied default tag for this call is 'maDN', but the caller can override this default by supplying an explicit value.

Return value

None

Remarks

Because noncached memory and contiguous memory are seldom released until the allocating miniport driver is unloading, a caller of NdisFreeMemoryWithTagPriority usually is running at IRQL = PASSIVE_LEVEL for these types of de-allocations. In any case:

  • When a caller of NdisFreeMemoryWithTagPriority releases contiguous memory, it must be running at IRQL = PASSIVE_LEVEL.

  • When a caller of NdisFreeMemoryWithTagPriority releases noncached memory, it must be running at IRQL < DISPATCH_LEVEL.

  • When a caller of NdisFreeMemoryWithTagPriority releases memory that is neither contiguous nor noncached, it must be running at IRQL <= DISPATCH_LEVEL.

Requirements

Target platform

Universal

Version

Supported in NDIS 6.20 and later.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

See Remarks section.

See also

FilterAttach
MiniportInitializeEx
NdisAllocateMemoryWithTagPriority
NdisMRegisterMiniportDriver
NdisOpenAdapterEx
NdisRegisterProtocolDriver
NdisFRegisterFilterDriver

 

 

Send comments about this topic to Microsoft

Show:
© 2016 Microsoft