PFREE_COMMON_BUFFER - NtDoc

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

PFREE_COMMON_BUFFER PfreeCommonBuffer;

VOID PfreeCommonBuffer(
  [in] PDMA_ADAPTER DmaAdapter,
  [in] ULONG Length,
  [in] PHYSICAL_ADDRESS LogicalAddress,
  [in] PVOID VirtualAddress,
  [in] BOOLEAN CacheEnabled
)
{...}

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-wdm-pfree_common_buffer)

PFREE_COMMON_BUFFER callback function

Description

The FreeCommonBuffer routine frees a common buffer allocated by AllocateCommonBuffer, along with all resources the buffer uses.

Parameters

DmaAdapter [in]

Pointer to the DMA_ADAPTER structure returned by IoGetDmaAdapter that represents the bus-master adapter or DMA controller.

Length [in]

Specifies the number of bytes to deallocate.

LogicalAddress [in]

Specifies the logical address of the allocated memory range.

VirtualAddress [in]

Pointer to the corresponding virtual address of the allocated memory range.

CacheEnabled [in]

Indicates whether the allocated memory is cached.

Remarks

FreeCommonBuffer is not a system routine that can be called directly by name. This routine is callable only by pointer from the address returned in a DMA_OPERATIONS structure. Drivers obtain the address of this routine by calling IoGetDmaAdapter.

To release a common buffer, a driver calls FreeCommonBuffer to unmap both its logical and virtual addresses. The parameters passed to FreeCommonBuffer must match exactly those passed to and returned from AllocateCommonBuffer. A driver cannot free part of an allocated common buffer.

See also

AllocateCommonBuffer

DMA_ADAPTER

DMA_OPERATIONS

IoGetDmaAdapter