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

# vnode\_pager\_purge\_range(9)

invalidate the cached content within the given byte range

## NAME

**vnode\_pager\_purge\_range** – invalidate the cached content within the given byte range

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<vm/vm.h\>**

**#include \<vm/vm\_extern.h\>**

*void*\

**vnode\_pager\_purge\_range**(*struct vnode \*vp*, *vm\_ooffset\_t start*, *vm\_ooffset\_t end*);

## DESCRIPTION

**vnode\_pager\_purge\_range** invalidates the cached content within the given byte range from the specified vnode *vp*. The range to be purged is \[ *start*, *end*,). If the *end* parameter is the value zero, the affected range starts from *start* continues to the end of the object. Pages within the specified range will be removed from the object's queue. If *start* or *end* is not aligned to a page boundary, the invalidated part of the page is zeroed. This function only cleans the resident pages in the affected region, it is up to the callers to ensure reading the backing store gets back zeroes.

In case the vnode *vp* does not have a VM object allocated, the effect of calling this function is a no-op.

## LOCKS

The vnode must be locked on entry and will still be locked on exit.

## SEE ALSO

[vnode(9)](/vnode/9.md)

## HISTORY

The **vnode\_pager\_purge\_range** manual page first appeared in FreeBSD 14.

## AUTHORS

This manual page was written by Ka Ho Ng ⟨*khng@FreeBSD.org*⟩.
