Bewerken

Delen via


ExFreePool function (wdm.h)

The ExFreePool routine deallocates a block of pool memory.

Syntax

void ExFreePool(
  [in] PVOID P
);

Parameters

[in] P

Specifies the address of the block of pool memory being deallocated.

Return value

None

Remarks

This routine releases memory allocated by ExAllocatePool, ExAllocatePoolWithTag, ExAllocatePoolWithQuota, or ExAllocatePoolWithQuotaTag. The memory block must not be accessed after it is freed.

Drivers can also use the ExFreePoolWithTag routine to free buffers allocated by ExAllocatePoolWithTag and ExAllocatePoolWithQuotaTag.

Callers of ExFreePool must be running at IRQL <= DISPATCH_LEVEL. A caller at DISPATCH_LEVEL must have specified a NonPagedXxxPoolType when the memory was allocated. Otherwise, the caller must be running at IRQL <= APC_LEVEL.

Requirements

Requirement Value
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 <= DISPATCH_LEVEL (see Remarks section)
DDI compliance rules DoubleExFreePool(storport)

See also

ExAllocatePool

ExAllocatePoolWithQuota

ExAllocatePoolWithQuotaTag

ExAllocatePoolWithTag

ExFreePoolWithTag