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