Go to main content

man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: Thursday, June 13, 2019
 
 

btopr(9F)

Name

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

Synopsis

#include <sys/ddi.h>

unsigned long btopr(unsigned long numbytes);

Interface Level

Architecture independent level 1 (DDI/DKI).

Parameters

numbytes

Number of bytes.

Description

The btopr() 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 btopr(4096) returns 2, and btopr(4097) returns 3.

Return Values

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

Context

The btopr() function can be called from user, interrupt, or kernel context.

See Also

ptob(9F), btop(9F), ddi_btopr(9F)

Writing Device Drivers in Oracle Solaris 11.4