STRUCT DRM_MEMORY_STATS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct drm_memory_stats(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” yes we're in kernel land today and honestly? it's giving main character energy. this page is all about struct drm_memory_stats, and no cap, it's the lil glow-up struct that holds your GEM object stats ✨


🌸 NAME 🌸

struct drm_memory_stats β€” GEM object stats, all associated and cozy together 🫢


✨ SYNOPSIS ✨

like, here's the whole vibe, literally verbatim:

struct drm_memory_stats {
    u64 shared;
    u64 private;
    u64 resident;
    u64 purgeable;
    u64 active;
 };

that's it. five u64s and a dream πŸ’–


πŸŽ€ Members πŸŽ€

  • shared β€” the total size of GEM objects that are shared between processes. it's giving collaborative. it's giving "we're all in this together" 🀝
  • private β€” the total size of GEM objects. periodt. just... all of them πŸ’€
  • resident β€” the total size of GEM objects backing pages. they're literally there, living rent-free 🏠
  • purgeable β€” the total size of GEM objects that can be purged. and iykyk: "purgeable" here means resident and not active. both conditions, bestie, no skipping πŸ™ˆ
  • active β€” the total size of GEM objects that are active on one or more engines. go go go πŸ”₯

πŸ¦‹ Description πŸ¦‹

okay so this whole struct is used by drm_print_memory_stats. that's the whole description. short, sweet, iconic πŸ‘‘


🌈 SEE ALSO 🌈

the kernel file ./include/drm/drm_file.h β€” which is where all these besties live β€” plus:


reminder bestie: this is straight from the source, no invented lore, no extra tips dressed up as facts. everything above is exactly what the page says, just cuter πŸ’œ

and that's a wrap, angel! 🌟 this little masterpiece is from ./include/drm, dated October 2026, and it's struct drm_memory_stats(9) forever and always. mwah πŸ’‹πŸŽ€πŸ§š

πŸ“¦ where this page comes from