mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:25:48 +00:00
[NTOS:PS] Implement PS_QUOTA_TYPE and let the quota code use it (#3389)
This will replace the PoolIndex variable and as such we'll only be using the PS_QUOTA_TYPE enumeration, as Windows does. Both QuotaEntry, QuotaUsage and QuotaPeak depend explicitly or implicitly on this enumeration. Further details about this enum can be found in the following articles. https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ps/psquota/type.htm?tx=68,143 https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ps/psquota/block.htm?tx=68,142,143 https://www.geoffchappell.com/studies/windows/km/ntoskrnl/inc/ps/eprocess/index.htm (see QuotaPeak and QuotaUsage)
This commit is contained in:
parent
9536f44c81
commit
6170b574f0
4 changed files with 56 additions and 43 deletions
|
@ -972,6 +972,23 @@ typedef struct _JOB_SET_ARRAY
|
|||
ULONG Flags;
|
||||
} JOB_SET_ARRAY, *PJOB_SET_ARRAY;
|
||||
|
||||
//
|
||||
// Process Quota Type
|
||||
//
|
||||
typedef enum _PS_QUOTA_TYPE
|
||||
{
|
||||
PsNonPagedPool = 0,
|
||||
PsPagedPool,
|
||||
PsPageFile,
|
||||
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
|
||||
PsWorkingSet,
|
||||
#endif
|
||||
#if (NTDDI_VERSION == NTDDI_LONGHORN)
|
||||
PsCpuRate,
|
||||
#endif
|
||||
PsQuotaTypes
|
||||
} PS_QUOTA_TYPE;
|
||||
|
||||
//
|
||||
// EPROCESS Quota Structures
|
||||
//
|
||||
|
@ -985,7 +1002,7 @@ typedef struct _EPROCESS_QUOTA_ENTRY
|
|||
|
||||
typedef struct _EPROCESS_QUOTA_BLOCK
|
||||
{
|
||||
EPROCESS_QUOTA_ENTRY QuotaEntry[3];
|
||||
EPROCESS_QUOTA_ENTRY QuotaEntry[PsQuotaTypes];
|
||||
LIST_ENTRY QuotaList;
|
||||
ULONG ReferenceCount;
|
||||
ULONG ProcessCount;
|
||||
|
@ -1208,8 +1225,8 @@ typedef struct _EPROCESS
|
|||
EX_RUNDOWN_REF RundownProtect;
|
||||
HANDLE UniqueProcessId;
|
||||
LIST_ENTRY ActiveProcessLinks;
|
||||
SIZE_T QuotaUsage[3]; /* 0=PagedPool, 1=NonPagedPool, 2=Pagefile */
|
||||
SIZE_T QuotaPeak[3]; /* ditto */
|
||||
SIZE_T QuotaUsage[PsQuotaTypes];
|
||||
SIZE_T QuotaPeak[PsQuotaTypes];
|
||||
SIZE_T CommitCharge;
|
||||
SIZE_T PeakVirtualSize;
|
||||
SIZE_T VirtualSize;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue