VM_SET_PAGE_SIZE(9)

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

πŸ’– NAME πŸ’–

okay so bestie, welcome to VM_SET_PAGE_SIZE(9) from the Kernel Developer's Manual πŸ’… this one is all about vm_set_page_size β€” the function that literally initializes the system page size ✨


✨ SYNOPSIS ✨

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

void
vm_set_page_size(void);

🌸 DESCRIPTION 🌸

The vm_set_page_size() function initializes the system page size. Periodt. 🫢

Here's the vibe check: if vm_cnt.v_page_size β€” see <sys/vmmeter.h> β€” equals 0, then PAGE_SIZE is used. Otherwise, the value stored in vm_cnt.v_page_size is the one that gets used. πŸ’–

and if vm_cnt.v_page_size is not a power of two? yeah no, the system will panic πŸ˜­πŸ’€ so pls be careful.

vm_set_page_size() must be called prior to any page size dependent functions. fr fr, do not skip this step πŸ‘‘


🫢 AUTHORS 🫢

This manual page was written by Chad David <davidc@acns.ab.ca>. iconic behavior, honestly πŸ’–


cute lil sign-off: this page is from Debian, dated March 21, 2014 πŸŒˆπŸŽ€

πŸ“¦ where this page comes from