PsChargePoolQuota - NtDoc

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

VOID PsChargePoolQuota(
  [in] PEPROCESS Process,
  [in] POOL_TYPE PoolType,
  [in] ULONG_PTR Amount
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntifs-pschargepoolquota)

PsChargePoolQuota function

Description

The PsChargePoolQuota routine charges pool quota of the specified pool type to the specified process.

Parameters

Process [in]

Pointer to the process whose quota is to be charged.

PoolType [in]

Type of pool quota to charge, which can be one of the following:

The NonPagedPoolMustSucceed and NonPagedPoolCacheAlignedMustS pool types are obsolete and should no longer be used.

Amount [in]

Number of bytes to charge against the pool quota for this process.

Remarks

If insufficient quota exists for the process, quota is not charged, and PsChargePoolQuota raises an exception with the status value STATUS_QUOTA_EXCEEDED. Callers are responsible for handling this exception. Thus calls to PsChargePoolQuota must be wrapped within a driver-supplied exception handler.

Every successful call to PsChargePoolQuota must be matched by a subsequent call to PsReturnPoolQuota.

For more information about memory management, see Memory Management.

See also

PsReturnPoolQuota