drm_gem_obj...memory_stats(9)
π drm_gem_obj...memory_stats(9) π
okay so bestie, welcome to the Kernel API Manual β yes, the whole entire manual, and today's main character is this one tiny little boolean function that's honestly kind of a vibe. pull up a chair π
β¨ NAME β¨
drm_gem_object_is_shared_for_memory_stats β the helper for shared memory stats, that's literally her job description, no cap π
πΈ SYNOPSIS πΈ
bool drm_gem_object_is_shared_for_memory_stats (struct drm_gem_object
*obj );
it returns a bool, she takes a struct drm_gem_object *obj, and the call is drm_gem_object_is_shared_for_memory_stats. that's it. that's the whole synopsis. slay π
π¦ ARGUMENTS π¦
objβ the obj in question π like, the actualstruct drm_gem_object *you're asking about. that's the one. she's the subject of the investigation, periodt.
π₯ DESCRIPTION π₯
okay so here's the tea β β this helper should only be used for fdinfo shared memory stats. only. exclusively. that's her whole lane and she is not leaving it π«Ά
her entire purpose is to determine if a GEM object is shared. is it shared? is it not shared? she returns a bool and lets you know. that's the function. iconic behaviour, honestly.
bestie pls don't repurpose her for something else π she is specifically the fdinfo shared memory stats helper, and the manpage is very clear about that. respect her boundaries fr fr.
π SEE ALSO π
go check out the Kernel file ./include/drm/drm_gem.h β and while you're in the neighborhood, here's the whole friend group:
enum drm_gem_object_status(9)struct drm_gem_object_funcs(9)struct drm_gem_lru(9)struct drm_gem_object(9)DRM_GEM_FOPS(9)DEFINE_DRM_GEM_FOPS(9)drm_gem_get_huge_mnt(9)drm_gem_object_get(9)drm_gem_object_put(9)drm_gem_is_imported(9)drm_gem_gpuva_init(9)drm_gem_for_each_gpuvm_bo(9)drm_gem_for_each_gpuvm_bo_safe(9)
aaaand that's the page π before you go β this whole thing lives in ./include/drm, and it's dated October 2026 β so like, mark your calendar bestie. bye bye, go read your fdinfo stats responsibly ππ§
π¦ 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