STRUCT SMEM_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct smem_info(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” yes we're in the kernel docs now, and yes this one is a struct, and yes it's giving main character energy. this page is literally about struct smem_info, aka the smem region info that's located after the table of contents. that's the whole vibe. no cap.


✨ NAME ✨

struct smem_info β€” the smem region info that lives right after the table of contents πŸŽ€


🌸 SYNOPSIS 🌸

ok so here's the shape of her, character for character, don't touch anything:

struct smem_info {
    u8 magic[4];
    __le32 size;
    __le32 base_addr;
    __le32 reserved;
    __le16 num_items;
 };

look at that little layout. iconique. the indentation on that closing brace is doing its own thing and we respect it 🫢


πŸ¦‹ Members πŸ¦‹

okay let's go through the squad one by one:

  • magic β€” the magic number bestie, and it must be SMEM_INFO_MAGIC. no substitutions, this is the vibe check of the whole struct πŸ’…
  • size β€” the size of the smem region. that's it. that's the girl. 🌸
  • base_addr β€” the base address of the smem region ✨
  • reserved β€” for now, a reserved entry. it's just sitting there, minding its business, lowkey chilling πŸ™ˆ
  • num_items β€” the highest accepted item number πŸ‘‘

πŸ”₯ SEE ALSO πŸ”₯

if you wanna keep reading (and you do, i know you do), the kernel file is ./drivers/soc/qcom/smem.c and it comes with a whole friend group:

like, that is a full group chat. go say hi 🧚


and that's the whole page, bestie! this little cutie lives over in ./drivers/soc/qcom, the version stamp says October 2026, and the manual is struct smem_info(9). slay, go read some kernel source, i'm obsessed with you πŸ’œβ­

πŸ“¦ where this page comes from