folio_zero_segment(9)
π
folio_zero_segment β the folio_zero_segment(9) glow-up
okay so bestie, this is a page from the Kernel API Manual, and it's honestly short and sweet β a little one-job function that just clears the vibes in a chunk of a folio. no cap, it does exactly one thing, and it does it well. let's get into it β¨
β¨ NAME β¨
folio_zero_segment β zero out a byte range inside a folio. that's it. that's the whole personality. π
πΈ SYNOPSIS πΈ
void folio_zero_segment (struct folio *folio , size_t start , size_t
xend );
literally the whole signature, character for character, no edits, we respect the source π
π¦ ARGUMENTS π¦
three args, three vibes, let's go:
folioβ the folio you're writing into. this is the main character, the canvas, the thing getting its bytes gently set to zero π«Άstartβ the very first byte to zero. the starting line, the beginning of the glow-down βxendβ one more than the last byte to zero π yes bestie, one more, it's exclusive-ish in that classic C way, so don't come for me β that's literally what the page says π
heads up: xend being "one more than the last byte" is not a typo, it's just how this one's shaped. read it twice, it's fine, i promise π
π SEE ALSO π
okay this bit is iconic because it's a whole friend group. the kernel file lives at ./include/linux/highmem.h, and here's everyone invited to the group chat:
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_segments(9)folio_zero_range(9)folio_release_kmap(9)
like, twenty entries. she's social. she has range. ππ
π§ sign-off π§
and that's the page, bestie β source ./include/linux, dated October 2026, manual name folio_zero_segment(9), filed under the Kernel API Manual. slay, zero those bytes, hydrate, and remember: xend is one more. periodt π
π₯
π¦ 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