DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

btopr(D3)


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

Synopsis

   #include <sys/types.h>
   #include <sys/ddi.h>
   

ulong_t btopr(ulong_t numbytes);

Description

btopr returns the number of pages that are contained in the specified number of bytes, with upward rounding if the byte count is not a page multiple.

Arguments


numbytes
Size in bytes to convert to equivalent size in pages.

Return values

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

Usage

Context and synchronization

All contexts.

Examples

If the page size is 2048, then btopr(4096) and btopr(4095) both return 2, and btopr(4097) returns 3. btopr(0) returns 0.

Hardware applicability

All

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp

References

btop(D3), ptob(D3)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005