drm_suballoc_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_suballoc_alloc(9) β€” the Kernel API Manual, bestie edition

okay so welcome to the group chat, this is the drm_suballoc_alloc(9) page from the Kernel API Manual and honestly? it's short, it's sweet, it's giving "hold my spot" energy and i'm obsessed 🫢


✨ NAME ✨

drm_suballoc_alloc β€” allocate an uninitialized suballoc object. no cap, that's the whole job. πŸŽ€


🌸 SYNOPSIS 🌸

struct drm_suballoc * drm_suballoc_alloc (gfp_t gfp );

like yeah that's it, that's the function signature, look at her go πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gfp β€” the gfp flags used for memory allocation. that's it. that's the whole argument. she's lowkey simple like that ✨

πŸ’– DESCRIPTION πŸ’–

bestie listen, this one is the plan-ahead girlie of the suballoc family 😭

drm_suballoc_alloc allocates memory for an uninitialized suballoc object. the intended usage (and this is the iconique part) is to allocate the memory for the suballoc object outside of a reclaim tainted context, and then have it initialized at a later time in a reclaim tainted context. like, book the venue early, throw the party later πŸ”₯

real talk though: this whole split-timing thing is literally the point of the function, so don't be out here doing the initialize-in-the-same-context thing and calling it a day β€” the design intent is allocate early, init later πŸ’€

and if the returned suballoc object is in its uninitialized state, drm_suballoc_free should be used to release the memory. that's the cleanup bestie, use her 🧚


⭐ RETURN ⭐

you get back a new uninitialized suballoc object πŸŽ€ … or, if things go sideways, an ERR_PTR(-ENOMEM). yeah. that's the vibe check failing. no memory for you πŸ™ˆ


🌈 SEE ALSO 🌈

the whole suballoc friend group, fr fr πŸ‘‘


and that's the page!! written from ./drivers/gpu/drm, dated October 2026 β€” ty for coming to my ted talk, mwah πŸ˜˜πŸ’œ

πŸ“¦ where this page comes from