Expand Minimize

VideoPortAllocatePool function

The VideoPortAllocatePool function allocates a block of pool memory, inserting a caller-supplied tag at the beginning of the memory.

Syntax


PVOID VideoPortAllocatePool(
  _In_  PVOID HwDeviceExtension,
  _In_  VP_POOL_TYPE PoolType,
  _In_  SIZE_T NumberOfBytes,
  _In_  ULONG Tag
);

Parameters

HwDeviceExtension [in]

Pointer to the miniport driver's device extension.

PoolType [in]

Specifies the type of memory pool to allocate. This parameter can be set to one of the following:

ValueMeaning

VpNonPagedPool

The pool is from nonpaged memory.

VpPagedPool

The pool is from paged memory.

VpNonPagedPoolCacheAligned

The pool is from cache-aligned, nonpaged memory.

VpPagedPoolCacheAligned

The pool is from cache-aligned, paged memory.

 

NumberOfBytes [in]

Specifies the number of bytes of memory to allocate.

Tag [in]

Specifies a four-byte allocation tag, consisting of up to four ASCII characters, that uniquely identifies the driver that is allocating the memory. The tag string is delimited with single quotes.

Return value

On successful allocation of the memory pool, VideoPortAllocatePool returns the address of the allocated memory pool. Otherwise, this function returns NULL.

Remarks

VideoPortAllocatePool is intended to replace VideoPortAllocateBuffer, which is obsolete.

The Tag string should be specified in byte-reversed order. It is recommended that the first letter in the string (before it is reversed) be 'D' to denote a display driver; the other three bytes should be indicative of the driver name. For example, the Tag string 'zyxD' appears as 'Dxyz' if pool is dumped. The tag appears in any crash dump of the system that occurs.

Callers of VideoPortAllocatePool can be running at IRQL = DISPATCH_LEVEL only if the requested PoolType is one of the VpNonPagedXxx types. Otherwise, callers must be running at IRQL < DISPATCH_LEVEL.

Requirements

Version

Available in Windows XP and later versions of the Windows operating systems.

Header

Video.h (include Video.h)

Library

Videoprt.lib

DLL

Videoprt.sys

IRQL

See Remarks section.

See also

VideoPortFreePool

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft