PMAP_GROWKERNEL(9)

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

πŸ’… PMAP_GROWKERNEL β€” like, the kernel dev manual page (section 9, bestie) πŸŽ€

okay so picture this: you're deep in the 9 section of the Kernel Developer's Manual, and you've stumbled onto pmap_growkernel. she's short, she's sweet, she does exactly one thing, and honestly? she ate. let's get into it πŸ’–


✨ NAME ✨

pmap_growkernel β€” grow the kernel virtual address (KVA) space 🌱➑️🌳

like literally, that's the whole gig. she makes the KVA space bigger. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

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

void
pmap_growkernel(vm_offset_t addr);

three includes, one function, zero stress. the way that <sys/param.h> and <vm/vm.h> and <vm/pmap.h> all gotta be there first though β€” bestie, don't skip them, the compiler will absolutely notice πŸ’€

she returns void, meaning she gives you nothing back and that's on purpose. she's not about that return-value life. take the vm_offset_t addr and go 🫢


πŸ’œ DESCRIPTION πŸ’œ

okay so the pmap_growkernel() function grows the kernel virtual address space to the virtual address addr. that's it. that's the vibe. you hand her an addr, she stretches the KVA space out until it reaches it. main character energy, fr fr πŸ”₯

and if that growth needs more page entries? she'll allocate more page entries if required. she just handles it. no drama, no asking you twice, no follow-up questions. iconic behavior honestly πŸ‘‘

just remember addr is a vm_offset_t, so keep your types correct or it's giving undefined chaos πŸ’…

🌈 SEE ALSO 🌈

  • pmap(9) β€” the rest of the pmap crew, iykyk 🧚

πŸ“ AUTHORS πŸ“

This manual page was written by Bruce M Simpson <bms@spc.org> β€” ty for your service king, we salute you πŸ™βœ¨


aaaand that's the whole page, bestie! πŸ’– this lil beauty is from the Debian crew, dated July 21, 2003 β€” vintage, retro, still slaying after all these years πŸŽ€ go forth and grow that kernel virtual address space, you've got this πŸŒΈβœ¨πŸ’…

πŸ“¦ where this page comes from