NdisAllocateMemoryWithTagPriority function

NDIS drivers call the NdisAllocateMemoryWithTagPriority function to allocate a pool of memory from the non-paged pool.

Syntax

PVOID NdisAllocateMemoryWithTagPriority(
  NDIS_HANDLE      NdisHandle,
  UINT             Length,
  ULONG            Tag,
  EX_POOL_PRIORITY Priority
);

Parameters

NdisHandle

An NDIS handle that the caller obtained during initialization. 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

Length

The size to be allocated, in bytes.

Tag

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.

Priority

The importance of this request. For more information, see ExAllocatePoolWithTagPriority.

Return Value

NdisAllocateMemoryWithTagPriority returns a pointer to a base virtual address of the allocated memory, or NULL if sufficient nonpaged memory is currently unavailable.

Remarks

To free memory that was allocated with NdisAllocateMemoryWithTagPriority, call the NdisFreeMemoryWithTagPriority or NdisFreeMemory function.

Requirements

   
Windows version Supported in NDIS 6.0 and later.
Target Platform Universal
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL "<= DISPATCH_LEVEL"
DDI compliance rules Irql_Miscellaneous_Function, NdisAllocateMemoryWithTagPriority

See Also

ExAllocatePoolWithTagPriority

FilterAttach

MiniportInitializeEx

NdisAllocateMemoryWithTag

NdisFRegisterFilterDriver

NdisFreeMemory

NdisFreeMemoryWithTagPriority

NdisMRegisterMiniportDriver

NdisOpenAdapterEx

NdisRegisterProtocolDriver