NdisFreeMemory - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ndis.h

VOID NdisFreeMemory(
  [in] PVOID VirtualAddress,
  [in] UINT  Length,
  [in] UINT  MemoryFlags
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ndis-ndisfreememory)

NdisFreeMemory function

Description

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

Parameters

VirtualAddress [in]

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

Length [in]

The size, in bytes, of the memory block to be released. If the memory was allocated with NdisAllocateMemoryWithTagPriority or the MemoryFlags parameter is zero, this parameter is ignored.

MemoryFlags [in]

A set of flags that specify the type of memory to free. This value must be zero if the memory was allocated with NdisAllocateMemoryWithTagPriority. With NDIS 6.0 and later versions, the NdisAllocateMemoryWithTagPriority is always used to allocate memory.

Remarks

Because noncached memory and contiguous memory are seldom 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:

See also

MiniportHaltEx

NdisAllocateMemoryWithTagPriority