btop(D3) btop(D3)
NAME
btop - convert size in bytes to size in pages (round down)
SYNOPSIS
#include <sys/types.h>
#include <sys/ddi.h>
ulong_t btop(ulong_t numbytes);
Arguments
numbytes Size in bytes to convert to equivalent size in
pages.
DESCRIPTION
btop returns the number of pages that are contained in the
specified number of bytes, with downward rounding if the byte
count is not a page multiple.
Return Values
The return value is the number of pages. There are no invalid
input values, and therefore no error return values.
USAGE
Level
Initialization, Base or Interrupt.
Synchronization Constraints
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
Examples
If the page size is 2048, then btop(4096) and btop(4097) both
return 2, and btop(4095) returns 1. btop(0) returns 0.
REFERENCES
btopr(D3), ptob(D3)
NOTICES
Portability
All processors
Applicability
ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp
Copyright 1994 Novell, Inc. Page 1