PVOID
ExAllocateFromNPagedLookasideList(
IN PNPAGED_LOOKASIDE_LIST Lookaside
);
ExAllocateFromNPagedLookasideList removes the first entry from the specified lookaside list in nonpaged memory. If the lookaside list is empty, an entry is allocated from nonpaged pool.
ExAllocateFromNPagedLookasideList returns a pointer to an entry if one can be allocated; otherwise it returns NULL.
If the lookaside list is not empty, ExAllocateFromNPagedLookasideList removes the first entry from the list and returns its address to the caller. If the lookaside list is empty, ExAllocateFromNPagedLookasideList calls the allocate routine specified at list initialization to allocate another entry from nonpaged 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, ExAllocateFromNPagedLookasideList returns NULL.
Callers of ExAllocateFromNPagedLookasideList must be running at IRQL <= DISPATCH_LEVEL.
ExInitializeNPagedLookasideList, ExFreeToNPagedLookasideList