The ExAllocatePoolWithQuota routine is obsolete, and is exported only for existing driver binaries. Use ExAllocatePoolWithQuotaTag instead.
ExAllocatePoolWithQuota allocates pool memory, charging quota against the current thread.
PVOID
ExAllocatePoolWithQuota(
IN POOL_TYPE PoolType,
IN SIZE_T NumberOfBytes
);
ExAllocatePoolWithQuota returns a pointer to the allocated pool.
If the request cannot be satisfied, ExAllocatePoolWithQuota raises an exception.
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
This routine is called by highest-level drivers that allocate memory to satisfy a request in the context of the thread that originally made the I/O request. Lower-level drivers call ExAllocatePoolWithTag instead.
If the NumberOfBytes requested is >= PAGE_SIZE, a page-aligned buffer is allocated. Quota is not charged to the thread for allocations >= PAGE_SIZE.
Memory requests for < PAGE_SIZE are allocated within a page and do not cross page boundaries. Memory requests for < PAGE_SIZE are not necessarily page-aligned but are aligned on an 8-byte boundary.
ExAllocatePoolWithQuota raises an exception if the pool allocation fails.
Callers of ExAllocatePoolWithQuota must be running at IRQL < DISPATCH_LEVEL.
ExAllocatePoolWithTag, ExAllocatePoolWithQuotaTag, ExFreePool