Introduce process quota management
Some checks failed
Builds / ExectOS (amd64, release) (push) Failing after 30s
Builds / ExectOS (i686, debug) (push) Failing after 35s
Builds / ExectOS (i686, release) (push) Failing after 27s
Builds / ExectOS (amd64, debug) (push) Failing after 36s

This commit is contained in:
2026-07-08 21:51:41 +02:00
parent f2922349de
commit 9012f82681
5 changed files with 265 additions and 0 deletions

View File

@@ -12,6 +12,7 @@
#include <xtos.hh>
#include <ps/process.hh>
#include <ps/quota.hh>
#include <ps/thread.hh>

View File

@@ -0,0 +1,38 @@
/**
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtoskrnl/includes/ps/quota.hh
* DESCRIPTION: Process Quota Management
* DEVELOPERS: Aiken Harris <harraiken91@gmail.com>
*/
#ifndef __XTOSKRNL_PS_QUOTA_HH
#define __XTOSKRNL_PS_QUOTA_HH
#include <xtos.hh>
/* Process and thread management */
namespace PS
{
class Quota
{
private:
STATIC EPROCESS_QUOTA_BLOCK DefaultQuotaBlock;
public:
STATIC XTAPI VOID ReturnSharedPoolQuota(IN PEPROCESS_QUOTA_BLOCK QuotaBlock,
IN SIZE_T PagedAmount,
IN SIZE_T NonPagedAmount);
private:
STATIC XTAPI VOID DereferenceQuotaBlock(IN PEPROCESS_QUOTA_BLOCK QuotaBlock);
STATIC XTFASTCALL VOID ReturnProcessQuota(IN PEPROCESS_QUOTA_BLOCK QuotaBlock,
IN PEPROCESS Process,
IN PS_QUOTA_TYPE QuotaType,
IN SIZE_T Amount);
};
}
#endif /* __XTOSKRNL_PS_QUOTA_HH */