PMAP_PINIT(9)
π PMAP_PINIT β the manual, but make it a group chat π
okay bestie, you found it, the kernel developer's manual page for pmap_pinit and pmap_pinit0, and honestly? it's giving "small page, big responsibilities." these two are the little functions that get your pmap structures ready to exist in the world. let's get into it π«Ά
β¨ NAME β¨
pmap_pinit, pmap_pinit0 β initialize pmap structures π
like literally that's the whole job. setup girls. no cap.
πΈ SYNOPSIS πΈ
so first you gotta invite the right headers to the party, obviously:
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/pmap.h>
and then, the moment you've all been waiting for:
void
pmap_pinit(pmap_t pmap);
void
pmap_pinit0(pmap_t pm);
both of them return void, meaning they give you absolutely nothing back except the satisfaction of a job well done. iconic behaviour tbh. they're not here to report, they're here to do. πβ¨
π¦ DESCRIPTION π¦
okay so, pmap_pinit() β the way that this function just takes the preallocated and zeroed structure pmap and initializes it. and when we say structure pmap, we mean like, one that lives inside a vmspace structure, for example. so like, if you've got a vmspace and it's got a pmap sitting in there all zeroed out and waiting, this is the girl who wakes it up. π
then there's pmap_pinit0(), her sister. she initializes the physical map pm, and pm is associated with process 0 β aka the very first process created in the system. the OG. the main character. the founding mother of every process that came after her πβ¨
so basically: one of them is for a general pmap chilling in a vmspace, and one of them is specifically for the physical map tied to process 0. different girls, different lanes, both slaying. π
π₯ IMPLEMENTATION NOTES π₯
okay this is the part where we have to be a little bit serious for a second, bestie, because there's lore here:
pmap_pinit2() has been deprecated.
she's not coming to the function. she's been retired. and the note says β very clearly, no ambiguity, no wiggle room β that she should be implemented as a stub until further notice. so if you're out here writing pmap_pinit2(), you write it as a stub. that's it. that's the assignment. don't be out here inventing behaviour for a deprecated function, i am begging π
π SEE ALSO π
go read these next, they're the friends of the family:
iykyk. the whole pmap cinematic universe. π
π AUTHORS π
this manual page was written by Bruce M Simpson <bms@spc.org>. thank you for your service, king π«‘π
and that's the whole page, bestie! this one came from the Debian crew, dated July 21, 2003, and it's filed under PMAP_PINIT(9) in the kernel developer's manual. old page, still relevant, still cute. mwah πβ¨πΈ
π¦ 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