qcom_tzmem_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… qcom_tzmem_alloc(9) β€” from the Kernel API Manual, bestie ✨

okay so this is a page about qcom_tzmem_alloc, and it lives in the Kernel API Manual β€” yes, the whole manual, and yes, this function is THAT girl πŸŽ€


🌸 NAME 🌸

qcom_tzmem_alloc β€” allocate a memory chunk that's suitable for sharing with TZ 🫢

like, it grabs you some memory, but specifically the kind that TZ will accept. no cap.


⭐ SYNOPSIS ⭐

void * qcom_tzmem_alloc (struct qcom_tzmem_pool *pool , size_t size ,
       gfp_t gfp );

look at her go πŸ’… three args, no drama.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • pool β€” the TZ memory pool you're pulling from. this is where the memory comes from, bestie 🌈
  • size β€” how many bytes you want. the exact number. don't be weird about it πŸ’œ
  • gfp β€” the GFP flags. yes, those. πŸ‘‘

✨ DESCRIPTION ✨

So here's the tea: you can use this in any context. literally any. it's giving versatile, it's giving low-maintenance, it's giving main character energy πŸ”₯


πŸŽ€ RETURN πŸŽ€

You get back the address of the allocated buffer β€” iconic, love that for you πŸ’–

OR you get NULL if no more memory can be allocated 😭 it's not you, it's the allocator.

⚠️ important, bestie: that buffer must be released using qcom_tzmem_free. no ghosting your memory. free it, periodt 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file:

./drivers/firmware/qcom/qcom_tzmem.c

and her whole friend group πŸ’…:

go follow them, they're all mutuals ✨


and that's the whole page!! 🌈 this one came from ./drivers/firmware/qcom, dated October 2026 β€” so yeah, mark your calendars, she's future-dated and thriving πŸ§šπŸ’œ

πŸ“¦ where this page comes from