btopr - convert size in bytes to size in pages (round up)
#include <sys/ddi.h> unsigned long btopr(unsigned long numbytes);
Architecture independent level 1 (DDI/DKI).
numbytes
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.
The return value is always the number of pages. There are no invalid input values, and therefore no error return values.
The btopr() function can be called from user, interrupt, or kernel context.
btop(9F), ddi_btopr(9F), ptob(9F)
Writing Device Drivers
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |