vm_page_grab(9)

vm_page_grab9

Returns a page from an object

Usage

#include <sys/param.h>

#include <vm/vm.h>

#include <vm/vm_page.h>

vm_page_t

vm_page_grab(vm_object_t object, vm_pindex_t pindex, int allocflags);

Overview

The vm_page_grab() function returns the page at pindex from the given object. If the page exists and is busy, vm_page_grab() will sleep while waiting for it. If the page does not exist, it is allocated.

If VM_ALLOC_RETRY is not set in allocflags and the function sleeps, either getting the page from the object or while allocating it, NULL is returned.

Return values

If successful, vm_page_grab() returns the page; otherwise, NULL is returned.

Authors

This manual page was written by Chad David ⟨[email protected]⟩.

From freebsd-manpages 6.0-5 in Debian 4.0 (Etch). Parsed by carta from the page's mdoc source.