ExFreePoolWithTag function

The ExFreePoolWithTag routine deallocates a block of pool memory allocated with the specified tag.

Syntax

NTKERNELAPI VOID ExFreePoolWithTag(
  __drv_freesMem(Mem)PVOID P,
  ULONG                    Tag
);

Parameters

P

Specifies the beginning address of a block of pool memory allocated by either ExAllocatePoolWithTag or ExAllocatePoolWithQuotaTag.

Tag

Specifies the tag value passed to ExAllocatePoolWithTag or ExAllocatePoolWithQuotaTag when the block of memory was originally allocated.

NOTE

Tag must be a value from 0x20 (space) to 0x126 (tilde).

Return Value

None

Remarks

Callers of ExFreePoolWithTag 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

   
Windows version 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 IrqlExFree1, IrqlExFree2, IrqlExFree3

See Also

ExAllocatePoolWithQuotaTag

ExAllocatePoolWithTag

ExFreePool