folio_zero_range(9)
π folio_zero_range β from the Kernel API Manual (section 9, bestie)
okay so picture this: you've got a folio, right? and you just need a lil chunk of it to be zeros. not the whole thing, just some bytes. that's literally this function. it's giving "selective erasure" and honestly? iconic. β¨
πΈ NAME πΈ
folio_zero_range β zero a byte range in a folio. that's it. that's the whole job. no cap. π
β¨ SYNOPSIS β¨
void folio_zero_range (struct folio *folio , size_t start , size_t
length );
like, look at her. void return, three args, no drama. she's not gonna tell you if it worked β she just does it. main character energy fr fr. π«Ά
π ARGUMENTS π
folioβ the folio you're writing to. this is the vibe check target, the thing getting zeroed. your canvas, your main squeeze. π¦startβ the first byte to zero. like, where the zeroing begins. the starting line. the "we begin here" of it all. βlengthβ the number of bytes to zero. how many bytes get the treatment. the size of the zero party. π
so between start and start + length, everything becomes zero. that's the tea. π
β οΈ heads up bestie: this page does not hand you a return value, because the function is void. it also doesn't promise anything about errors here β so don't go inventing guarantees that aren't on the page, iykyk. π
π SEE ALSO π
the kernel file in question lives at ./include/linux/highmem.h, and the whole highmem/highpage extended universe is right here β go be nosy, it's a whole friend group:
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_segment(9)folio_release_kmap(9)
π one folio, one range, zero bytes. go off, bestie.
that's the whole page, babes β brought to you by the ./include/linux directory, dated October 2026, and delivered in true folio_zero_range(9) fashion. mwah π
πβ¨π₯
π¦ 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