#include <sys/ddi.h> unsigned long btopr(unsigned long numbytes);
Architecture independent level 1 (DDI/DKI).
btopr() 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.
btopr() can be called from user or interrupt context.