NDIS_PAGEABLE_FUNCTION(FunctionName)
None
HeadersDeclared in Ndis.h. Include Ndis.h.
CommentsAny driver function marked with NDIS_PAGEABLE_FUNCTION can be paged out of memory after it returns control and paged back into memory if it is called subsequently.
For example, such a function is declared in the driver source as follows:
VOID miniportXxx(...);
#pragma NDIS_PAGEABLE_FUNCTION(miniportXxx)
... //other function declarations
VOID
miniportXxx(...)
{
...
}
...
Because Windows 2000 and later versions in-page operations run at IRQL < DISPATCH_LEVEL, any NDIS driver function that can possibly execute at IRQL >= DISPATCH_LEVEL cannot be made pageable. Marking a driver function pageable when it runs at IRQL >= DISPATCH_LEVEL can cause fatal page faults in that driver.
Usually, NIC drivers can use this macro on their MiniportInitialize and MiniportHalt functions. A miniport driver also can use this macro on internal driver functions called only by MiniportInitialize or MiniportHalt, as long as the functions marked pageable never call any of the NdisXxx that raise IRQL, such as NdisAcquireSpinLock.
NDIS protocol drivers can use this macro on any driver function that always runs at IRQL < DISPATCH_LEVEL. Such a function is never called at raised IRQL. Such a function cannot call driver or system-supplied functions that run at IRQL >= DISPATCH_LEVEL
本文地址:http://com.8s8s.com/it/it33332.htm