mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 07:09:47 +00:00
SystemMonitor: Use new format functions.
This commit is contained in:
parent
6ed3a4b5fe
commit
0dec600a2a
Notes:
sideshowbarker
2024-07-19 02:00:08 +09:00
Author: https://github.com/asynts
Commit: 0dec600a2a
Pull-request: https://github.com/SerenityOS/serenity/pull/3704
7 changed files with 21 additions and 21 deletions
|
@ -119,12 +119,12 @@ void MemoryStatsWidget::refresh()
|
|||
size_t user_pages_available = user_physical_allocated + user_physical_available;
|
||||
size_t supervisor_pages_available = super_physical_alloc + super_physical_free;
|
||||
|
||||
m_kmalloc_space_label->set_text(String::format("%uK/%uK", bytes_to_kb(kmalloc_allocated), bytes_to_kb(kmalloc_sum_available)));
|
||||
m_user_physical_pages_label->set_text(String::format("%uK/%uK", page_count_to_kb(user_physical_allocated), page_count_to_kb(user_pages_available)));
|
||||
m_supervisor_physical_pages_label->set_text(String::format("%uK/%uK", page_count_to_kb(super_physical_alloc), page_count_to_kb(supervisor_pages_available)));
|
||||
m_kmalloc_count_label->set_text(String::format("%u", kmalloc_call_count));
|
||||
m_kfree_count_label->set_text(String::format("%u", kfree_call_count));
|
||||
m_kmalloc_difference_label->set_text(String::format("+%u", kmalloc_call_count - kfree_call_count));
|
||||
m_kmalloc_space_label->set_text(String::formatted("{}K/{}K", bytes_to_kb(kmalloc_allocated), bytes_to_kb(kmalloc_sum_available)));
|
||||
m_user_physical_pages_label->set_text(String::formatted("{}K/{}K", page_count_to_kb(user_physical_allocated), page_count_to_kb(user_pages_available)));
|
||||
m_supervisor_physical_pages_label->set_text(String::formatted("{}K/{}K", page_count_to_kb(super_physical_alloc), page_count_to_kb(supervisor_pages_available)));
|
||||
m_kmalloc_count_label->set_text(String::formatted("{}", kmalloc_call_count));
|
||||
m_kfree_count_label->set_text(String::formatted("{}", kfree_call_count));
|
||||
m_kmalloc_difference_label->set_text(String::formatted("{:+}", kmalloc_call_count - kfree_call_count));
|
||||
|
||||
m_graph.set_max(page_count_to_kb(user_pages_available));
|
||||
m_graph.add_value(page_count_to_kb(user_physical_allocated));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue