devm_kzalloc(9)

devm_kzalloc9

Resource-managed kzalloc

Usage

void * devm_kzalloc(struct device * dev, size_t size, gfp_t gfp);

Arguments

dev

Device to allocate memory for

size

Allocation size

gfp

Allocation gfp flags

Overview

Managed kzalloc. Memory allocated with this function is automatically freed on driver detach. Like all other devres resources, guaranteed alignment is unsigned long long.

Returns

Pointer to allocated memory on success, NULL on failure.

Releases

4 releases since Debian 4.0 (Etch); the text changed 3 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7

From linux-manual-3.2 3.2.78-1 in Debian 7 (Wheezy). Parsed by carta from the page's man source.