PMAP_ZERO(9)
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 listspmap_zero_area, while the synopsis below spells the area functionpmap_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
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms