__sg_free_table(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __sg_free_table(9) β€” Kernel API Manual πŸ’–

Okay so bestie, welcome to the kernel API manual ✨ β€” this one's from the Kernel API Manual and it's all about __sg_free_table, which (spoiler) frees a previously mapped sg table. Cleanup era. We love a function that knows when to let go πŸ’…


🌸 NAME 🌸

__sg_free_table β€” Free a previously mapped sg table 🫢


✨ SYNOPSIS ✨

void __sg_free_table (struct sg_table *table , unsigned int max_ents ,
       unsigned int nents_first_chunk , sg_free_fn *free_fn , unsigned int
       num_ents );

πŸŽ€ ARGUMENTS πŸŽ€

  • table β€” the sg table header you're working with πŸ’–
  • max_ents β€” the maximum number of entries per single scatterlist ✨
  • nents_first_chunk β€” number of entries in the (preallocated) first scatterlist chunk. 0 means there's no such preallocated first chunk, iykyk πŸ™ˆ
  • free_fn β€” the free function (yes, that's the whole description, she's lowkey self-explanatory πŸ‘‘)
  • num_ents β€” number of entries in the table πŸ”₯

πŸ¦‹ DESCRIPTION πŸ¦‹

Free an sg table that was previously allocated and set up with __sg_alloc_table. It's giving "you made this mess, now clean it up" 🧹✨

⚠️ Okay this part actually matters: the max_ents value must be identical to the one you previously used with __sg_alloc_table. No mixing and matching, bestie β€” they have to match fr fr πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./lib/scatterlist.c and the whole scatterlist friend group 🫢:


✨ sign-off time ✨

That's the whole page, bestie β€” brought to you by ./lib πŸ“, October 2026 edition, and it's __sg_free_table(9) all the way down πŸ’œ Go free that table, you absolute icon πŸ‘‘πŸ’…

πŸ“¦ where this page comes from