drmm_kmalloc_array(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ drmm_kmalloc_array(9) ✨

okay bestie, welcome to the Kernel API Manual β€” this is the page for drmm_kmalloc_array, and yes it's a whole mood πŸ’…


🌸 NAME 🌸

drmm_kmalloc_array β€” the &drm_device managed version of kmalloc_array(), no cap 🫢


πŸŽ€ SYNOPSIS πŸŽ€

void * drmm_kmalloc_array (struct drm_device *dev , size_t n , size_t
size , gfp_t flags );

literally that's the whole vibe, look at her go ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the DRM device, she's the main character here πŸ‘‘
  • n β€” number of array elements to allocate, like how many lil slots you want πŸ“
  • size β€” size of one array member, i.e. how chunky each slot is
  • flags β€” the GFP allocation flags, you know the drill πŸ’«

πŸ’– DESCRIPTION πŸ’–

so this is a drm_device managed version of kmalloc_array β€” think of it as kmalloc_array but with a built-in cleanup crew 🧚

the way that this works: the memory you allocate is automatically freed on the final drm_dev_put. you don't have to remember to free it, she handles it herself, iconic behaviour honestly 😭

and it works exactly like a memory allocation obtained by drmm_kmalloc β€” same energy, same rules, periodt πŸ”₯


🌈 SEE ALSO 🌈

kernel file ./include/drm/drm_managed.h, plus the whole friend group:


πŸ’€ small reminder: this page lives in ./include/drm, dated October 2026, and it's all the drmm_kmalloc_array(9) manual page β€” go forth and allocate responsibly, bestie πŸ’œ

⭐ mwah, that's the page ⭐

πŸ“¦ where this page comes from