Return Value

Availability

The PsChargeProcessPoolQuota function is exported
by name from the kernel in version 5.1 and higher.

Documentation Status

The PsChargeProcessPoolQuota function is not documented.
It is, however, declared in the NTIFS.H header from the Windows Driver Kit (WDK).

Behaviour

The PsChargeProcessPoolQuota function is essentially
the ancient PsChargePoolQuota
function except for returning an error code instead of raising an exception.

Interpretation of PoolType as selecting non-paged
or paged pool is sound in version 6.0 and higher. Even today, 17th October 2017,
Microsoft’s documentation (of PsChargePoolQuota) states
explicitly that some other values of POOL_TYPE are meaningful
for the PoolType (and some others are obsolete), but
the reality in version 6.0 and higher is that all values other than
PagedPool are treated as NonPagedPool.

In versions 5.1 and 5.2 the PoolType might better
be thought of as a quota type from the PS_QUOTA_TYPE
enumeration. This is compatible with POOL_TYPE for the
values 0 and 1 to charge against the quota for non-paged and paged pool. The value
2 selects the paging file quota. Higher values are not defended and can cause undefined
behaviour.

This page was created on 17th
October 2017 and was last modified
on 13th November 2017.