PMAP_ZERO(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

hey bestie πŸ’– welcome to the PMAP_ZERO(9) page from the Kernel Developer's Manual β€” yes, section 9, kernel-dev territory, we love a niche little memory moment. This page is short and iconic: it's giving "please zero this memory for me, but make it machine-dependent and optimized." ✨

✨ NAME ✨

So the page says pmap_zero_page, pmap_zero_area β€” and the whole vibe is zero-fill a page using machine-dependent optimizations. That's it, no cap. πŸ’…

tiny heads-up, bestie πŸ‘€: the NAME line lists pmap_zero_area, while the synopsis below spells the area function pmap_zero_page_area(). I'm keeping both exactly as printed, iykyk β€” not me editing the manual, just preserving the facts. 🫢

🌸 SYNOPSIS 🌸

First, pull in these headers, exactly like this:

#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() zero-fills an entire page using machine-dependent optimizations. The whole page, sparkling clean, and the machine gets to use its special little tricks. slay. 🧚

Then pmap_zero_page_area() is the area version: it's used to zero-fill an area of a page.

🚨 BIG caveat, bestie: the range specified must not cross a page boundary; it must be contained entirely within a single page. No straddling pages, not today, not ever. Keep that range inside one page or the vibe check fails. 😭

πŸ› οΈ IMPLEMENTATION NOTES πŸ› οΈ

This function is required to be implemented for each architecture supported by FreeBSD. Required, bestie β€” every architecture FreeBSD supports has to have it implemented. periodt. πŸ”₯

πŸ‘€ SEE ALSO πŸ‘€

go peek at these, bestie:

🫢 AUTHORS 🫢

This manual page was written by Bruce M Simpson <bms@spc.org>. Shoutout to Bruce, icon behavior. πŸ‘‘


xoxo πŸ’‹ this page came from Debian, dated August 30, 2016 β€” and yes, it's the PMAP_ZERO(9) manual page. byeee πŸ¦‹

πŸ“¦ where this page comes from