Windows Driver Kit: Kernel-Mode Driver Architecture
POOL_TYPE

The POOL_TYPE enumeration type specifies the type of system memory to allocate.

typedef enum _POOL_TYPE {
  NonPagedPool,
  PagedPool,
  NonPagedPoolMustSucceed,
  DontUseThisType,
  NonPagedPoolCacheAligned,
  PagedPoolCacheAligned,
  NonPagedPoolCacheAlignedMustS
} POOL_TYPE;

Values

NonPagedPool
Nonpaged pool, which is nonpageable system memory. Nonpaged pool can be accessed from any IRQL, but it is a scarce resource and drivers should allocate it only when necessary.

The system can allocate buffers larger than PAGE_SIZE from nonpaged pool only in multiples of PAGE_SIZE. Requests for buffers larger than PAGE_SIZE, but not a PAGE_SIZE multiple, waste nonpageable memory.

PagedPool
Paged pool, which is pageable system memory. Paged pool can only be allocated and accessed at IRQL < DISPATCH_LEVEL.
NonPagedPoolMustSucceed
This value is for internal use only, and is allowed only during system startup. Drivers must not specify this value at times other than system startup, because a "must succeed" request crashes the system if the requested memory size is unavailable.
DontUseThisType
Reserved for system use.
NonPagedPoolCacheAligned
Nonpaged pool, aligned on processor cache boundaries. This value is for internal use only.
PagedPoolCacheAligned
Paged pool, aligned on processor cache boundaries. This value is for internal use only.
NonPagedPoolCacheAlignedMustS
This value is for internal use only, and is allowed only during system startup. It is the cache-aligned equivalent of NonPagedPoolMustSucceed.

Comments

When the system allocates a buffer from pool memory of PAGE_SIZE or greater, it aligns the buffer on a page boundary. Memory requests smaller than PAGE_SIZE are not necessarily aligned on page boundaries, but these requests always fit within a single page and are aligned on an 8-byte boundary.

Requirements

Headers: Defined in Wdm.h. Include Wdm.h, Ntddk.h, or Ntifs.h.

See Also

ExAllocatePoolWithTag, ExAllocatePoolWithQuotaTag, ExAllocatePoolWithTagPriority


Send feedback on this topic
Built on July 08, 2009
Tags :


Page view tracker