ptob(D3DK) —
.IX \f4ptob\fP(D3DK)
NAME
ptob − convert size in pages to size in bytes
SYNOPSIS
#include <sys/types.h>
#include <sys/ddi.h>
ulong_t ptob(ulong_t numpages);
ARGUMENTS
numpagesSize in pages to convert to equivalent size in bytes.
DESCRIPTION
ptob returns the number of bytes that are contained in the specified number of pages. For example, if the page size is 2048, then ptob(2) returns 4096. ptob(0) returns 0.
RETURN VALUE
The return value is the number of bytes in the specified number of pages. There is no checking done on the input value and overflow is not detected. In the case of a page count whose corresponding byte count cannot be represented by a ulong_t the higher order bits are truncated.
LEVEL
Base or Interrupt.
NOTES
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks may be held across calls to this function.
SEE ALSO
btop(D3DK), btopr(D3DK)
DDI/DKI