*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: zero_region | Section: 9 | Source: FreeBSD | File: zero_region.9.gz
ZERO_REGION(9) FreeBSD Kernel Developer's Manual ZERO_REGION(9) NAME zero_region - Read-only region prefilled with zeroes SYNOPSIS #include <sys/param.h> #include <sys/systm.h> #include <vm/vm_param.h> extern const void *zero_region; DESCRIPTION The global variable zero_region points to a read-only region prefilled with zeroes. The size of the region is specified by the ZERO_REGION_SIZE macro. IMPLEMENTATION NOTES The region zero_region points to is mapped to the same page multiple times. EXAMPLES /* * This function writes zeroes to the vnode at offset 0 * with ZERO_REGION_SIZE length. */ static int write_example(struct vnode *vp) { struct thread *td; struct iovec aiov; struct uio auio; int error; td = curthread; aiov.iov_base = __DECONST(void *, zero_region); aiov.iov_len = ZERO_REGION_SIZE; auio.uio_iov = &aiov; auio.uio_iovcnt = 1; auio.uio_offset = 0; auio.uio_resid = ZERO_REGION_SIZE; auio.uio_segflg = UIO_SYSSPACE; auio.uio_rw = UIO_WRITE; auio.uio_td = td; error = VOP_WRITE(vp, &auio, 0, td->td_ucred); return (error); } SEE ALSO pmap(9), vm_map(9) AUTHORS This manual page was written by Ka Ho Ng <[email protected]> under sponsorship from the FreeBSD Foundation. FreeBSD 14.1-RELEASE-p8 March 2, 2021 FreeBSD 14.1-RELEASE-p8

Navigation Options