Previous Next

ExFreeToPagedLookasideList

The ExFreeToPagedLookasideList routine returns a pageable entry to the given lookaside list or to paged pool.

VOID 
  ExFreeToPagedLookasideList(
    IN PPAGED_LOOKASIDE_LIST  Lookaside,
    IN PVOID  Entry
    );

Parameters

Lookaside
Pointer to the resident head of the lookaside list, which the caller already initialized with ExInitializePagedLookasideList.
Entry
Pointer to the entry to be freed. The caller obtained this pointer from a preceding call to ExAllocateFromPagedLookasideList.

Return Value

None

Headers

Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.

Comments

ExFreeToPagedLookasideList is the reciprocal of ExAllocateFromPagedLookasideList. It releases a caller-allocated entry back to the caller's lookaside list or to paged pool when that entry is no longer in use.

The same entry can be reallocated or another entry can be allocated later with a subsequent call to ExAllocateFromPagedLookasideList. The user of a lookaside list can allocate and free such entries dynamically, as needed, until it calls ExDeletePagedLookasideList. ExDeletePagedLookasideList releases any outstanding entries in the list before it clears the system state for the given lookaside list and returns control.

If the specified lookaside list has not yet reached the system-determined maximum number of entries, ExFreeToPagedLookasideList inserts the given entry at the front of the list. Otherwise, the buffer at Entry is released back to paged pool using the caller-supplied Free routine, if any, that was set up when the lookaside list was initialized or ExFreePool.

Callers of ExFreeToPagedLookasideList must be running at IRQL < DISPATCH_LEVEL.

See Also

ExAllocateFromPagedLookasideList, ExDeletePagedLookasideList, ExInitializePagedLookasideList