mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
SystemMonitor: Unbreak the memory stats graph
It was never updating because we'd just seek the start of /proc/memstat over and over, which didn't generate new contents. Instead, open the file on every iteration.
This commit is contained in:
parent
806f19d647
commit
d9385d7d62
2 changed files with 5 additions and 14 deletions
|
@ -1,6 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibCore/CFile.h>
|
||||
#include <LibGUI/GWidget.h>
|
||||
|
||||
class GLabel;
|
||||
|
@ -18,12 +17,9 @@ public:
|
|||
private:
|
||||
MemoryStatsWidget(GraphWidget& graph, GWidget* parent);
|
||||
|
||||
virtual void timer_event(CTimerEvent&) override;
|
||||
|
||||
GraphWidget& m_graph;
|
||||
RefPtr<GLabel> m_user_physical_pages_label;
|
||||
RefPtr<GLabel> m_supervisor_physical_pages_label;
|
||||
RefPtr<GLabel> m_kmalloc_label;
|
||||
RefPtr<GLabel> m_kmalloc_count_label;
|
||||
RefPtr<CFile> m_proc_memstat;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue