NdisAllocateFromNPagedLookasideList (Windows CE 5.0)

Send Feedback

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.

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.

Return Values

NdisAllocateFromNPagedLookasideList returns a pointer to an entry if one can be removed from the lookaside list or allocated; otherwise, it returns NULL.

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 NdisInitializeNPagedLookasideList as each VC is torn down.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Ndis.h.
Link Library: Ndis.lib

See Also

NdisFreeToNPagedLookasideList | NdisInitializeNPagedLookasideList | NdisDeleteNPagedLookasideList

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.