STRUCT SMEM_HEADER(9)
π NAME
struct smem_header β bestie, it's the header that sits right at the beginning of the primary smem region π
β¨ SYNOPSIS
struct smem_header {
struct smem_proc_comm proc_comm[4];
__le32 version[32];
__le32 initialized;
__le32 free_offset;
__le32 available;
__le32 reserved;
struct smem_global_entry toc[SMEM_ITEM_COUNT];
};
π MEMBERS
okay so let's go through the crew one by one, no cap, every single field:
proc_commβ literally theproc_commcommunication interface, but make it legacy π it's the old-school one, still showing up to the partyversionβ an array of versions for the various subsystems π¦ everybody's got their own version number in hereinitializedβ a boolean that says whether smem is initialized or not, iykyk β¨free_offsetβ the index of the first unallocated byte in smem π that's your "next free spot" pointer basicallyavailableβ the number of bytes available for allocation, like your remaining allowance πΈreservedβ reserved field, and it must be 0 π¨ not "should", not "ideally" β must. do not touch, do not decorate, just leave it at zero fr frtocβ an array of references to items π the table of contents, main character energy
π¦ SEE ALSO
Kernel file ./drivers/soc/qcom/smem.c β and the whole extended fam π:
struct smem_proc_comm(9), struct smem_global_entry(9), struct smem_ptable_entry(9), struct smem_ptable(9), struct smem_partition_header(9), struct smem_partition(9), struct smem_private_entry(9), struct smem_info(9), struct smem_region(9), struct qcom_smem(9), qcom_smem_bust_hwspin_lock_by_host(9), qcom_smem_is_available(9), qcom_smem_alloc(9), qcom_smem_get(9), qcom_smem_get_free_space(9), qcom_smem_virt_to_phys(9), qcom_smem_get_soc_id(9), qcom_smem_get_feature_code(9)
and that's the whole page, bestie π«Ά this one lives in ./drivers/soc/qcom, and the version/date energy on it is October 2026 β so yeah, struct smem_header(9), dated October 2026, sourced from ./drivers/soc/qcom. slay π
β¨
π¦ 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