cp_free(9)
π cp_free(9) β Kernel API Manual, bestie edition β¨
okay so like, this whole page lives in the Kernel API Manual and it's about cp_free β literally the cleanup bestie of the channel program world π§Ήπ
π¦ NAME π¦
cp_free β frees the resources for a channel program. yes that's it, that's the whole job, and she does it flawlessly π
πΈ SYNOPSIS πΈ
void cp_free (struct channel_program *cp );
π ARGUMENTS π
cpβ thechannel_programyou're doing the operation on. that's the one, the main character of this whole function π«Ά
β¨ DESCRIPTION β¨
so what she actually does: this unpins the memory pages and frees the memory space occupied by cp π₯
but listen β that cp MUST have been returned by a previous call to cp_init. like, that's the vibe check. that's the requirement.
β οΈ and if it wasn't? undefined behavior occurs. not being dramatic, that's literally what the page says ππ so please, only pass in something cp_init actually handed you, okay? i'm not gonna say it twiceβ¦ well i might, but still π€
π SEE ALSO π
- Kernel file
./drivers/s390/cio/vfio_ccw_cp.c ccwchain_calc_length(9)cp_init(9)cp_prefetch(9)cp_get_orb(9)cp_update_scsw(9)cp_iova_pinned(9)
like, the whole friend group honestly πβ¨
source: ./drivers/s390/cio β and this icon was dropped October 2026 ποΈπ mwah, go free your memory responsibly bestie, ily ππ§ββοΈ
π¦ 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