1btopr(9F) Kernel Functions for Drivers btopr(9F)
2
3
4
6 btopr - convert size in bytes to size in pages (round up)
7
9 #include <sys/ddi.h>
10
11
12
13 unsigned long btopr(unsigned long numbytes);
14
15
17 Architecture independent level 1 (DDI/DKI).
18
20 numbytes Number of bytes.
21
22
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
30 The return value is always the number of pages. There are no invalid
31 input values, and therefore no error return values.
32
34 The btopr() function can be called from user, interrupt, or kernel con‐
35 text.
36
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)