BYTES_TO_PAGES macro (wdm.h)

The BYTES_TO_PAGES macro takes the size in bytes of the transfer request and calculates the number of pages required to contain the bytes.

Syntax

void BYTES_TO_PAGES(
  [in]  Size
);

Parameters

[in] Size

Specifies the size in bytes of the transfer request.

Return value

None

Remarks

BYTES_TO_PAGES returns the number of pages required to contain the specified number of bytes.

The system-defined constant PAGE_SIZE can be used to determine whether a given length in bytes for a transfer is less than the virtual memory page size of the current platform.

Requirements

Requirement Value
Minimum supported client Windows 2000
Header wdm.h
IRQL Any level