1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:47:45 +00:00

ProcessManager: Show some basic system memory stats below the process table.

This really improves the feeling of "system overview" :^)
This commit is contained in:
Andreas Kling 2019-03-10 12:13:22 +01:00
parent 8017c1e17c
commit 37388b311f
9 changed files with 158 additions and 9 deletions

View file

@ -12,6 +12,8 @@
//#define PAGE_FAULT_DEBUG
static MemoryManager* s_the;
unsigned MemoryManager::s_user_physical_pages_in_existence;
unsigned MemoryManager::s_super_physical_pages_in_existence;
MemoryManager& MM
{
@ -686,6 +688,10 @@ PhysicalPage::PhysicalPage(PhysicalAddress paddr, bool supervisor, bool may_retu
, m_supervisor(supervisor)
, m_paddr(paddr)
{
if (supervisor)
++MemoryManager::s_super_physical_pages_in_existence;
else
++MemoryManager::s_user_physical_pages_in_existence;
}
void PhysicalPage::return_to_freelist()