ExAllocateFromPagedLookasideList

PVOID
    ExAllocateFromPagedLookasideList(

        IN PPAGED_LOOKASIDE_LIST  Lookaside
        );

ExAllocateFromPagedLookasideList removes the first entry from the specified lookaside list in paged memory.

Parameters

Lookaside
Points to the header of the lookaside list from which the entry will be allocated.

Return Value

ExAllocateFromPagedLookasideList returns a pointer to an entry if one can be allocated; otherwise it returns NULL.

Comments

If the lookaside list is not empty, ExAllocateFromPagedLookasideList removes the first entry from the list and returns its address to the caller. If the lookaside list is empty, ExAllocateFromPagedLookasideList calls the allocate routine specified at list initialization to allocate another entry from paged pool and returns its address to the caller. If no custom allocate routine was specified, this routine calls ExAllocatePoolWithTag. If the allocate routine cannot allocate an entry, ExAllocateFromPagedLookasideList returns NULL.

Callers of ExAllocateFromPagedLookasideList must be running at IRQL < DISPATCH_LEVEL.

See Also

ExInitializePagedLookasideList, ExFreeToPagedLookasideList