ExFreePoolWithTag - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdm.h

VOID ExFreePoolWithTag(
  [in] PVOID P,
  [in] ULONG Tag
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdm-exfreepoolwithtag)

ExFreePoolWithTag function

Description

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

Parameters

P [in]

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

Tag [in]

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

The tag is a non-zero character literal of one to four characters delimited by single quotation marks (for example, 'Tag1'). The string is usually specified in reverse order (for example, '1gaT'). Each ASCII character in the tag must be a value in the range 0x20 (space) to 0x7E (tilde). Each allocation code path should use a unique pool tag to help debuggers and verifiers identify the code path.

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.

See also

ExAllocatePoolWithQuotaTag

ExAllocatePoolWithTag

ExFreePool