// 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
No description available.
The FreeCommonBuffer routine frees a common buffer allocated by AllocateCommonBuffer, along with all resources the buffer uses.
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.
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.