sg_free_table_chained(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 sg_free_table_chained(9) 🌸

okay bestie, so this one is from the Kernel API Manual and it's literally the cleanup arc of the sg table saga πŸ’… nobody talks about the free function but she's the main character of not leaking memory, fr fr.


✨ NAME ✨

sg_free_table_chained β€” free a previously mapped sg table 🧹✨


πŸ¦‹ SYNOPSIS πŸ¦‹

void sg_free_table_chained (struct sg_table *table , unsigned
nents_first_chunk );

πŸŽ€ ARGUMENTS πŸŽ€

  • table β€” the sg table header you're using, bestie. this is the one getting freed πŸ‘‘
  • nents_first_chunk β€” the size of the first_chunk SGL that you passed to sg_alloc_table_chained. yes, the same number. iykyk πŸ’€

πŸ’– DESCRIPTION πŸ’–

so like, this frees an sg table that was previously allocated and set up with sg_alloc_table_chained. it's the matching pair, the duo, the two halves of the friendship bracelet 🫢

and listen β€” nents_first_chunk has to be the same as that same parameter you passed to sg_alloc_table_chained. not "close enough", not "i think it was 4", not "whatever my brain remembers from last tuesday". the same. same-same. that's the vibe check and if you fail it, that's on you 😭

no cap β€” mismatching this value is not the moment to be cute. it must match exactly what you gave sg_alloc_table_chained.

🌈 SEE ALSO 🌈


and that's the whole page, bestie! πŸ“ this icon lives in ./lib, it's dated October 2026, and it's part of the Kernel API Manual β€” go forth and free your tables correctly, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from