folio_zero_segments(9)
π folio_zero_segments(9) β the Kernel API Manual, bestie edition π
Okay so real talk, welcome to folio_zero_segments(9) from the Kernel API Manual. This one's short and sweet but she does exactly what she says on the tin β let's get into it π
β¨ NAME β¨
folio_zero_segments β zero two byte ranges in a folio. Two of them. Like, a duo. A little zeroing duo π«Ά
β¨ SYNOPSIS β¨
void folio_zero_segments (struct folio *folio , size_t start1 , size_t
xend1 , size_t start2 , size_t xend2 );
That's the whole signature, no notes, copy it exactly, periodt β¨
β¨ ARGUMENTS β¨
folioβ the folio you're writing to, like the main character of the whole operation πstart1β the first byte to zero, in the first range. The opening act πΈxend1β one more than the last byte in the first range. Yes, "one more" β it's giving exclusive, not inclusive πstart2β the first byte to zero in the second range. Round two, bestie πxend2β one more than the last byte in the second range. Same deal asxend1, just for the sequel π«
β¨ SEE ALSO β¨
Here's the little friend group β all from the kernel file ./include/linux/highmem.h π lowkey a whole squad:
kmap(9)kunmap(9)kmap_to_page(9)kmap_flush_unused(9)kmap_local_page(9)kmap_local_folio(9)kmap_atomic(9)clear_user_page(9)clear_user_pages(9)clear_user_highpage(9)clear_user_highpages(9)vma_alloc_zeroed_movable_folio(9)memcpy_from_folio(9)memcpy_to_folio(9)folio_zero_tail(9)folio_fill_tail(9)memcpy_from_file_folio(9)folio_zero_segment(9)folio_zero_range(9)folio_release_kmap(9)
Every single one, accounted for, no cap π§
Heads up bestie: this page lists no description, no options, no return value, nothing else β just the args and the friends. So that's the whole vibe check. Don't go inventing extra behaviour, iykyk π
And that's the page, mwah π β brought to you by ./include/linux, dated October 2026, filed very officially under folio_zero_segments(9). Slay, go zero those two ranges π
β¨π·
π¦ 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