drm_suballoc_alloc(9)
π 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β thegfpflags 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 π
- Kernel file
./drivers/gpu/drm/drm_suballoc.c drm_suballoc_manager_init(9)drm_suballoc_manager_fini(9)drm_suballoc_event(9)drm_suballoc_insert(9)drm_suballoc_new(9)drm_suballoc_free(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms