1DEVM_KZALLOC(9) Driver Basics DEVM_KZALLOC(9)
2
3
4
6 devm_kzalloc - Resource-managed kzalloc
7
9 void * devm_kzalloc(struct device * dev, size_t size, gfp_t gfp);
10
12 dev
13 Device to allocate memory for
14
15 size
16 Allocation size
17
18 gfp
19 Allocation gfp flags
20
22 Managed kzalloc. Memory allocated with this function is automatically
23 freed on driver detach. Like all other devres resources, guaranteed
24 alignment is unsigned long long.
25
27 Pointer to allocated memory on success, NULL on failure.
28
30Kernel Hackers Manual 2.6. November 2011 DEVM_KZALLOC(9)