'\"macro stdmacro
.if n .pH ddi_dki.btopr @(#)btopr	40.5 of 10/10/89
.\" Copyright 1989 AT&T
.de IX
.ie '\\n(.z'' .tm .Index: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9	\\n%
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..
.nr X
.if \nX=0 .ds x} btopr D3DK "" "DDI/DKI" "\&"
.if \nX=1 .ds x} btopr D3DK "" "DDI/DKI"
.if \nX=2 .ds x} btopr D3DK "" "\&"
.if \nX=3 .ds x} btopr "" "" "\&"
.TH \*(x}
.IX "\f4btopr\fP(D3DK)"
.SH NAME
\f4btopr\f1 \- convert size in bytes to size in pages (round up)
.SH SYNOPSIS
.nf
.na
\f4#include <sys/ddi.h>
.sp 0.5
\f4unsigned long btopr(\f4unsigned long \f2numbytes\f4);\f1
.ad
.fi
.SH ARGUMENT
.RS 0n 15
.IP "\f2numbytes\f1" 10n
Number of bytes.
.RE
.SH DESCRIPTION
This function returns the number of memory pages contained
in the specified number of bytes memory, rounded up to the next whole page.
For example, if the page size is 2048, then \f4btopr(4096)\f1 returns
\f42\f1, and \f4btopr(4097)\f1 returns \f43\f1.
.SH "RETURN VALUE"
The return value is always the number of pages.  There are no invalid
input values, and therefore no error return values.
.SH LEVEL
Base or Interrupt
.SH "SEE ALSO"
.na
\f4btop\f1(D3DK),
\f4ptob\f1(D3DK)
.ad
