NdisAllocateFromNPagedLookasideList (Windows Embedded CE 6.0)
1/6/2010
This 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.
Syntax
PVOID NdisAllocateFromNPagedLookasideList( IN PNPAGED_LOOKASIDE_LIST Lookaside);
Parameters
Lookaside
Pointer to the head of the lookaside list from which the entry will be allocated. The caller already initialized the list head with NdisInitializeNPagedLookasideList.
Remarks
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 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 a nonpaged entry.
All entries allocated from a nonpaged lookaside list are of a fixed size, 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 it needs from a lookaside list as VCs are created and release each such entry back to the lookaside list with NdisInitializeNPagedLookasideListas each VC is torn down.
Requirements
Header | ndis.h |
Library | ndis.lib |
Windows Embedded CE | Windows CE .NET 4.0 and later |
See Also
Reference
NDIS Library Functions
NdisFreeToNPagedLookasideList
NdisInitializeNPagedLookasideList
NdisDeleteNPagedLookasideList