---
name: "dmam_alloc_coherent"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/dmam_alloc_coherent"
---

# dmam\_alloc\_coherent(9)

Managed dma\_alloc\_coherent

## NAME

dmam\_alloc\_coherent - Managed **dma\_alloc\_coherent**

## SYNOPSIS

**void \* dmam\_alloc\_coherent(struct device \*** *dev***, size\_t** *size***, dma\_addr\_t \*** *dma\_handle***, gfp\_t** *gfp***);**

## ARGUMENTS

*dev*

Device to allocate coherent memory for

*size*

Size of allocation

*dma\_handle*

Out argument for allocated DMA handle

*gfp*

Allocation flags

## DESCRIPTION

Managed **dma\_alloc\_coherent**. Memory allocated using this function will be automatically released on driver detach.

## RETURNS

Pointer to allocated memory on success, NULL on failure.

## COPYRIGHT
