PMAP_CLEAR_MODIFY(9)

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

πŸ’… PMAP_CLEAR_MODIFY πŸ’…

ok so real talk bestie, this is a page from the Kernel Developer's Manual β€” section 9, kernel land, big main character energy. It's called PMAP_CLEAR_MODIFY and honestly? It's giving "tiny function, huge responsibility." Let's get into it 🫢


✨ NAME ✨

pmap_clear_modify β€” set information about physical pages

(yeah bestie the description says "set" but the function clears β€” the man page said what it said, I'm just the messenger πŸ’€)


🌸 SYNOPSIS 🌸

#include <sys/param.h>
#include <vm/vm.h>
#include <vm/pmap.h>

void
pmap_clear_modify(vm_page_t m);

three whole headers just to declare one little void function β€” iconic, no notes πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the whole vibe: the pmap_clear_modify() function clears the β€œmodified” bit on the physical page m. that's it. that's the function. it takes a vm_page_t m and it un-modifies it, periodt πŸ’…

like, imagine the page was out here living its best life, getting modified, being all "yes I've been written to 😌" β€” and then pmap_clear_modify() shows up and goes nope, clean slate, you're unmodified now. the modified bit? gone. cleared. not me erasing your whole reputation 😭

no return value to worry about either, it's void β€” it just does the thing and dips ✨


πŸ”₯ SEE ALSO πŸ”₯

go read those next bestie, they're literally the same friend group 🫢


πŸ‘‘ AUTHORS πŸ‘‘

This manual page was written by Bruce M Simpson <bms@spc.org> β€” thank you for your service king, this page ate πŸ’–


πŸ’€ lowkey important note: the page really does say "set information about physical pages" in the NAME section while the DESCRIPTION says it clears the modified bit. both are in the original, I'm not fixing it, I'm not merging them, I'm just reporting the facts fr fr 🌈

and that's the page!! this one came from Debian, dated July 17, 2014 β€” a vintage era, honestly a little retro moment for us all πŸŽ€ stay unmodified out there bestie, mwah πŸ“πŸ’œ

πŸ“¦ where this page comes from