The NdisAllocateFromNPagedLookasideList function removes the first entry from the given lookaside list head. If the lookaside list currently is empty, an entry is allocated from nonpaged pool.
void NdisAllocateFromNPagedLookasideList( _L );
A pointer to the head of the lookaside list from which the entry will be allocated. The caller already initialized the list head with the NdisInitializeNPagedLookasideList function.
If the lookaside list is not empty, NdisAllocateFromNPagedLookasideList removes the first entry from the list and returns its address to the caller. If the lookaside list is empty, NdisAllocateFromNPagedLookasideList either calls the Allocate function, specified in the Allocate parameter of the NdisInitializeNPagedLookasideList function, that the caller specified at list initialization, if any, or it allocates an entry on behalf of the caller. NdisAllocateFromNPagedLookasideList returns NULL if the caller-supplied Allocate function, if any, or if this function itself cannot allocate an nonpaged entry.
All entries that are allocated from a nonpaged lookaside list are of a fixed size, that was specified when the driver originally called NdisInitializeNPagedLookasideList. Consequently, a lookaside list is particularly useful to drivers that must allocate fixed-size blocks in which to maintain state in response to dynamic I/O demand. For example, any connection-oriented NDIS driver might allocate the VC context areas that it needs from a lookaside list as VCs are created and release each such entry back to the lookaside list with the NdisFreeToNPagedLookasideList function as each VC is torn down.
|Minimum supported client||Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisAllocateFromNPagedLookasideList (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisAllocateFromNPagedLookasideList (NDIS 5.1)) in Windows XP.|
|Header||ndis.h (include Ndis.h)|
|DDI compliance rules||Irql_Miscellaneous_Function|
See alsoNdisDeleteNPagedLookasideList NdisFreeToNPagedLookasideList NdisInitializeNPagedLookasideList