mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:48:12 +00:00
ProcFS: Fix inconsistent numbers in /proc/memstat
We were listing the total number of user/super pages as the number of "available" pages in the system. This was then misinterpreted in the SystemMonitor program and displayed wrong in the GUI.
This commit is contained in:
parent
6fd655102e
commit
dafd715743
1 changed files with 2 additions and 2 deletions
|
@ -716,9 +716,9 @@ Optional<KBuffer> procfs$memstat(InodeIdentifier)
|
|||
json.add("kmalloc_available", (u32)sum_free);
|
||||
json.add("kmalloc_eternal_allocated", (u32)kmalloc_sum_eternal);
|
||||
json.add("user_physical_allocated", MM.user_physical_pages_used());
|
||||
json.add("user_physical_available", MM.user_physical_pages());
|
||||
json.add("user_physical_available", MM.user_physical_pages() - MM.user_physical_pages_used());
|
||||
json.add("super_physical_allocated", MM.super_physical_pages_used());
|
||||
json.add("super_physical_available", MM.super_physical_pages());
|
||||
json.add("super_physical_available", MM.super_physical_pages() - MM.super_physical_pages_used());
|
||||
json.add("kmalloc_call_count", g_kmalloc_call_count);
|
||||
json.add("kfree_call_count", g_kfree_call_count);
|
||||
slab_alloc_stats([&json](size_t slab_size, size_t num_allocated, size_t num_free) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue