Bewerken

Delen via


ExFreeToLookasideListEx function (wdm.h)

The ExFreeToLookasideListEx routine inserts an entry into a lookaside list, or, if the list is full, frees the allocated storage for the entry.

Syntax

void ExFreeToLookasideListEx(
  [in, out] PLOOKASIDE_LIST_EX Lookaside,
  [in]      PVOID              Entry
);

Parameters

[in, out] Lookaside

A pointer to a LOOKASIDE_LIST_EX structure that describes a lookaside list. This structure was previously initialized by the ExInitializeLookasideListEx routine.

[in] Entry

A pointer to the lookaside-list entry that is being freed.

Return value

None

Remarks

Caution

Starting in Windows 11, version 22H2, this function changed from inline to exported. As a result, if you build your driver targeting the latest version of Windows, it will fail to load in older OS versions. To change the target OS version in Visual Studio, select Configuration Properties->Driver Settings->General.

This routine frees a lookaside-list entry that was allocated by a previous call to the ExAllocateFromLookasideListEx routine. ExFreeToLookasideListEx inserts the entry into the specified lookaside list, if space for the entry is available in the list. If the list is full (that is, it already contains the maximum number of entries, as determined by the operating system), ExFreeToLookasideListEx calls the LookasideListFreeEx routine to free the storage for the specified entry, if the driver has provided such a routine. Otherwise, a default deallocation routine is used to free the entry.

For more information about lookaside lists, see Using Lookaside Lists.

Requirements

Requirement Value
Minimum supported client Available in Windows Vista and later versions of Windows.
Target Platform Desktop
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= DISPATCH_LEVEL

See also

ExAllocateFromLookasideListEx

ExInitializeLookasideListEx

LOOKASIDE_LIST_EX