ExAllocateFromPagedLookasideList function

The ExAllocateFromPagedLookasideList routine returns a pointer to a paged entry from the given lookaside list, or it returns a pointer to a newly allocated paged entry.

Syntax

PVOID ExAllocateFromPagedLookasideList(
  PPAGED_LOOKASIDE_LIST Lookaside
);

Parameters

Lookaside

A pointer to the PAGED_LOOKASIDE_LIST structure for the lookaside list, which the caller already initialized with ExInitializePagedLookasideList.

Return Value

ExAllocateFromPagedLookasideList returns a pointer to an entry if one can be allocated. Otherwise, it returns NULL.

Remarks

If the given lookaside list is not empty, ExAllocateFromPagedLookasideList removes the first entry from the list and returns a pointer to this entry. Otherwise, ExAllocateFromPagedLookasideList either calls the Allocate routine specified at list initialization or ExAllocatePoolWithTag to return an entry pointer.

The caller can then set up the returned entry with any caller-determined data. The caller should release each entry with ExFreeToPagedLookasideList when it is no longer in use.

Because the entries in a paged lookaside list are allocated from pageable memory, they must not be accessed at an IRQL >= DISPATCH_LEVEL. You can use ExAllocateFromNPagedLookasideList to create a lookaside list with non-pageable entries.

On Windows 2000, drivers must use the -D_WIN2K_COMPAT_SLIST_USAGE switch to successfully link code that uses ExAllocateFromPagedLookasideList.

For more information, see Using Lookaside Lists.

Requirements

   
Minimum supported client Available starting with Windows 2000.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= APC_LEVEL

See Also

ExAllocateFromNPagedLookasideList

ExFreeToPagedLookasideList

ExInitializePagedLookasideList

PAGED_LOOKASIDE_LIST