1btopr(9F)                Kernel Functions for Drivers                btopr(9F)
2
3
4

NAME

6       btopr - convert size in bytes to size in pages (round up)
7

SYNOPSIS

9       #include <sys/ddi.h>
10
11
12
13       unsigned long btopr(unsigned long numbytes);
14
15

INTERFACE LEVEL

17       Architecture independent level 1 (DDI/DKI).
18

PARAMETERS

20       numbytes    Number of bytes.
21
22

DESCRIPTION

24       The  btopr()  function  returns the number of memory pages contained in
25       the specified number of bytes memory, rounded  up  to  the  next  whole
26       page.  For  example, if the page size is 2048, then btopr(4096) returns
27       2, and btopr(4097) returns 3.
28

RETURN VALUES

30       The return value is always the number of pages. There  are  no  invalid
31       input values, and therefore no error return values.
32

CONTEXT

34       The btopr() function can be called from user, interrupt, or kernel con‐
35       text.
36

SEE ALSO

38       btop(9F), ddi_btopr(9F), ptob(9F)
39
40
41       Writing Device Drivers
42
43
44
45SunOS 5.11                        16 Jan 2006                        btopr(9F)
Impressum