Partager via


NDIS_BUFFER_TO_SPAN_PAGES (Compact 2013)

3/26/2014

This macro determines how many physical pages of memory are being used to back a specified buffer.

Syntax

ULONG NDIS_BUFFER_TO_SPAN_PAGES(
  PNDIS_BUFFER _Buffer
);

Parameters

  • _Buffer
    Specifies the buffer descriptor mapping the buffer

Return Value

The return value is the Windows Embedded Compact version, which is always 1.

Remarks

This macro is used by DMA drivers to determine how many physical discontiguities exist in a specified virtual buffer.

The NDIS_BUFFER_TO_SPAN_PAGES macro is defined as follows.

#define NDIS_BUFFER_TO_SPAN_PAGES(_Buffer)                  \
    (MmGetMdlByteCount(_Buffer)==0 ?                        \
                1 :                                         \
                (COMPUTE_PAGES_SPANNED(                     \
                        MmGetMdlVirtualAddress(_Buffer),    \
                        MmGetMdlByteCount(_Buffer))))

Requirements

Header

ndis.h

See Also

Reference

NDIS 5.x Legacy Network Driver Macros
NDIS_BUFFER
NdisAllocateBuffer
NdisFreeBuffer
NDIS 5.x Legacy Reference