NdisMFreeSharedMemory - NtDoc

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

VOID NdisMFreeSharedMemory(
  [in] NDIS_HANDLE           MiniportAdapterHandle,
  [in] ULONG                 Length,
  [in] BOOLEAN               Cached,
  [in] PVOID                 VirtualAddress,
  [in] NDIS_PHYSICAL_ADDRESS PhysicalAddress
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

NdisMFreeSharedMemory function

Description

NdisMFreeSharedMemory frees memory that was previously allocated by NdisMAllocateSharedMemory or NdisMAllocateSharedMemoryAsyncEx by the driver of a DMA NIC.

Parameters

MiniportAdapterHandle [in]

Specifies the handle originally input to MiniportInitializeEx.

Length [in]

Specifies the number of bytes originally allocated.

Cached [in]

Specifies TRUE if the original allocation was cacheable.

VirtualAddress [in]

Specifies the base virtual address returned by NdisMAllocateSharedMemory or NdisMAllocateSharedMemoryAsyncEx.

PhysicalAddress [in]

Specifies the corresponding physical address returned by NdisMAllocateSharedMemory or NdisMAllocateSharedMemoryAsyncEx.

Remarks

If it has already made a successful call to NdisMAllocateSharedMemory or NdisMAllocateSharedMemoryAsyncEx, the miniport driver of a DMA device calls NdisMFreeSharedMemory if any of the following occurs:

A miniport driver cannot call NdisMFreeSharedMemory to free a subrange within an allocated shared memory range. The parameters passed to NdisMFreeSharedMemory must match exactly those that were passed to NdisMAllocateSharedMemory or NdisMAllocateSharedMemoryAsyncEx.

NdisMFreeSharedMemory cannot be called from a MiniportShutdownEx function.

Microsoft Windows Server 2003, Windows XP Service Pack 1, and later versions of Windows allow both bus-master DMA NICs and subordinate DMA NICs to call NdisMFreeSharedMemory. Prior releases allow only bus-master DMA NICs to call NdisMFreeSharedMemory.

See also

MiniportHaltEx

MiniportInitializeEx

MiniportSharedMemoryAllocateComplete

MiniportShutdownEx

NdisMAllocateSharedMemory

NdisMAllocateSharedMemoryAsyncEx