---
name: "vm_set_page_size"
section: "9"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/vm_set_page_size"
---

# vm\_set\_page\_size(9)

initialize the system page size

## NAME

**vm\_set\_page\_size** – initialize 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. If *vm\_cnt.v\_page\_size* (see ⟨sys/vmmeter.h⟩) equals 0, PAGE\_SIZE is used; otherwise, the value stored in *vm\_cnt.v\_page\_size* is used. If *vm\_cnt.v\_page\_size* is not a power of two, the system will panic.

**vm\_set\_page\_size**() must be called prior to any page size dependent functions.

## AUTHORS

This manual page was written by Chad David ⟨*davidc@acns.ab.ca*⟩.
