summaryrefslogtreecommitdiff
path: root/Kernel/MemoryManager.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-10 12:13:22 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-10 12:13:22 +0100
commit37388b311f290384e35f7ec82136399e41ac9663 (patch)
tree4ac850c82a125c95400f538e7290d28af041d38a /Kernel/MemoryManager.h
parent8017c1e17c7a7cc7a218ed8fbf05e8e5397e76cb (diff)
downloadserenity-37388b311f290384e35f7ec82136399e41ac9663.zip
ProcessManager: Show some basic system memory stats below the process table.
This really improves the feeling of "system overview" :^)
Diffstat (limited to 'Kernel/MemoryManager.h')
-rw-r--r--Kernel/MemoryManager.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Kernel/MemoryManager.h b/Kernel/MemoryManager.h
index 68ba00259f..da1e350173 100644
--- a/Kernel/MemoryManager.h
+++ b/Kernel/MemoryManager.h
@@ -228,6 +228,7 @@ class MemoryManager {
friend class Region;
friend class VMObject;
friend ByteBuffer procfs$mm(InodeIdentifier);
+ friend ByteBuffer procfs$memstat(InodeIdentifier);
public:
[[gnu::pure]] static MemoryManager& the();
@@ -254,6 +255,9 @@ public:
size_t ram_size() const { return m_ram_size; }
+ int user_physical_pages_in_existence() const { return s_user_physical_pages_in_existence; }
+ int super_physical_pages_in_existence() const { return s_super_physical_pages_in_existence; }
+
private:
MemoryManager();
~MemoryManager();
@@ -383,6 +387,9 @@ private:
dword* m_pte;
};
+ static unsigned s_user_physical_pages_in_existence;
+ static unsigned s_super_physical_pages_in_existence;
+
PageTableEntry ensure_pte(PageDirectory&, LinearAddress);
RetainPtr<PageDirectory> m_kernel_page_directory;