ExAllocatePoolUninitialized function (wdm.h)

This routine is a wrapper and replacement option for ExAllocatePoolWithTag.

Syntax

PVOID ExAllocatePoolUninitialized(
  __drv_strictTypeMatch(__drv_typeExpr)POOL_TYPE PoolType,
  SIZE_T                                         NumberOfBytes,
  ULONG                                          Tag
);

Parameters

PoolType

Defines the POOL_TYPE parameter PoolType.

NumberOfBytes

Defines the SIZE_T parameter NumberOfBytes.

Tag

Defines the ULONG parameter Tag.

Remarks

Use this wrapper if you want to explicitly not zero the allocated memory range.

A driver should only access memory within the byte range that it allocates. Accessing memory outside this range may corrupt the pool and cause the system to crash.

Memory that ExAllocatePoolUninitialized allocates is uninitialized. A kernel-mode driver must first zero this memory if it is going to make it visible to user-mode software (to avoid leaking potentially privileged contents).

See the Remarks section of ExAllocatePoolWithTag for additional guidance.

Requirements

Requirement Value
Minimum supported client Requires WDK for Windows 10, version 2004. Targets Windows 7 and later versions of the Windows operating system.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
IRQL IRQL <= DISPATCH_LEVEL (see Remarks section)

See also

ExAllocatePoolZero