Skip to content

Latest commit

 

History

History
101 lines (66 loc) · 3.35 KB

nc-wdm-pfree_common_buffer.md

File metadata and controls

101 lines (66 loc) · 3.35 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NC:wdm.PFREE_COMMON_BUFFER
PFREE_COMMON_BUFFER (wdm.h)
The FreeCommonBuffer routine frees a common buffer allocated by AllocateCommonBuffer, along with all resources the buffer uses.
kernel\freecommonbuffer.htm
kernel
04/30/2018
PFREE_COMMON_BUFFER callback function
FreeCommonBuffer, FreeCommonBuffer callback function [Kernel-Mode Driver Architecture], PFREE_COMMON_BUFFER, PFREE_COMMON_BUFFER callback, kdma_73f76fbd-2641-4002-90c8-ca412e969418.xml, kernel.freecommonbuffer, wdm/FreeCommonBuffer
wdm.h
Wdm.h, Ntddk.h, Ntifs.h
Desktop
Available starting with Windows 2000.
IrqlDispatch
PASSIVE_LEVEL
Windows
PFREE_COMMON_BUFFER
wdm/PFREE_COMMON_BUFFER
APIRef
kbSyntax
UserDefined
wdm.h
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

-param DmaAdapter [in]

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

-param Length [in]

Specifies the number of bytes to deallocate.

-param LogicalAddress [in]

Specifies the logical address of the allocated memory range.

-param VirtualAddress [in]

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

-param 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