PMAP_ZERO(9)
β¨ PMAP_ZERO(9) β¨ β Kernel Developer's Manual, bestie edition π
okay so this is the manual page for pmap_zero_page, pmap_zero_area β and yeah, we're zero-filling a page using machine-dependent optimizations π
it's giving "the kernel needs a clean slate and it's not doing it the slow way."
πΈ NAME πΈ
pmap_zero_page, pmap_zero_area β zero-fill a page using machine-dependent optimizations β¨
π¦ SYNOPSIS π¦
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/pmap.h>
void
pmap_zero_page(vm_page_t m);
void
pmap_zero_page_area(vm_page_t m, int off, int size);
π DESCRIPTION π
okay so pmap_zero_page() is the girl who zero-fills an entire page, and she does it using machine-dependent optimizations β like, she's not out here doing it the boring generic way, she knows her architecture and she's using it. π
then there's pmap_zero_page_area(), which is the "I only need part of a page" version β it zero-fills an area of a page. but listen, and this is important bestie:
the range you specify must not cross a page boundary. it has to be contained entirely within a single page. like, fully. no straddling. that's the vibe check and you have to pass it. π«π¦
π IMPLEMENTATION NOTES π
not me about to say the most serious thing in the cutest way: this function is required to be implemented for each architecture supported by FreeBSD. no skipping, no "I'll do it later," no "it's fine, someone else will handle it." every single arch. periodt. πβ¨
π SEE ALSO π
π«Ά AUTHORS π«Ά
this manual page was written by Bruce M Simpson <bms@spc.org> β an icon, a legend, and he is the moment. π
ngl bestie, if you noticed that the NAME section says pmap_zero_area while the synopsis says pmap_zero_page_areaβ¦ yeah. I'm literally just the messenger, I don't make the rules, I just retype them with glitter on top. π
β¨
and that's the page fr fr π it's from the Debian packaging, dated August 30, 2016 β so like, this has been zeroing pages since before some of us could drive. iconic behavior honestly. mwah π stay safe out there and remember: don't cross the page boundary. ππΈπ¦
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms