PsReturnPoolQuota routine

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

Process [in]

Pointer to the process whose quota is to be returned.

PoolType [in]

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

  • NonPagedPool
  • PagedPool
  • NonPagedPoolCacheAligned
  • PagedPoolCacheAligned

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

Amount [in]

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

Target platform

Universal

Header

Ntifs.h (include Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

< DISPATCH_LEVEL

See also

PsChargePoolQuota

 

 

Send comments about this topic to Microsoft

Show: