PsReturnPoolQuota function (ntifs.h)

The PsReturnPoolQuota routine returns pool quota of the specified pool type to the specified process.

Syntax

void PsReturnPoolQuota(
  [in] PEPROCESS Process,
  [in] POOL_TYPE PoolType,
  [in] ULONG_PTR Amount
);

Parameters

[in] Process

Pointer to the process whose quota is to be returned.

[in] PoolType

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

  • NonPagedPool
  • PagedPool
  • NonPagedPoolCacheAligned
  • PagedPoolCacheAligned

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

[in] Amount

Number of bytes to return to the pool quota for this process.

Return value

None

Remarks

If the quota return would exceed the quota for the process, PsReturnPoolQuota raises an exception with the status value STATUS_QUOTA_EXCEEDED. Callers are responsible for handling this exception. Thus calls to PsReturnPoolQuota 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.

Requirements

Requirement Value
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL < DISPATCH_LEVEL

See also

PsChargePoolQuota