qcom_tzmem_alloc(9)
π 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 π :
qcom_tzmem_shm_bridge_create(9)qcom_tzmem_shm_bridge_delete(9)qcom_tzmem_pool_new(9)qcom_tzmem_pool_free(9)devm_qcom_tzmem_pool_new(9)qcom_tzmem_free(9)qcom_tzmem_to_phys(9)
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
- 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