[NTOS:OB] Charge/Return pool quotas of objects
authorGeorge Bișoc <george.bisoc@reactos.org>
Thu, 30 Dec 2021 20:04:42 +0000 (21:04 +0100)
committerGeorge Bișoc <george.bisoc@reactos.org>
Tue, 11 Jan 2022 09:11:10 +0000 (10:11 +0100)
commit0c07eac5b40b05df5153ac5d44d85e1952e09645
treecbe455692741fbfc87d74cefb2c23a2184f55042
parentee697cfeef5dc1c2d6c0b3d07e6c8aaaf92d2fa1
[NTOS:OB] Charge/Return pool quotas of objects

As it currently stands the Object Manager doesn't charge any quotas when objects are created, nor it returns quotas when objects are de-allocated and freed from the objects namespace database. This alone can bring inconsistencies in the kernel as we simply don't know what is the amount charged in an object and thus we aren't keeping track of quotas flow.

Now with both PsReturnSharedPoolQuota and PsChargeSharedPoolQuota implemented, the Object Manager can now track the said flow of quotas every time an object is created or de-allocated, thus enforcing consistency with the use of quota resources.
ntoskrnl/ob/obhandle.c
ntoskrnl/ob/oblife.c