1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 18:45:10 +00:00
serenity/Applications/SystemMonitor/MemoryStatsWidget.h
Andreas Kling d9385d7d62 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.
2020-01-15 23:14:20 +01:00

25 lines
548 B
C++

#pragma once
#include <LibGUI/GWidget.h>
class GLabel;
class GraphWidget;
class MemoryStatsWidget final : public GWidget {
C_OBJECT(MemoryStatsWidget)
public:
static MemoryStatsWidget* the();
virtual ~MemoryStatsWidget() override;
void refresh();
private:
MemoryStatsWidget(GraphWidget& graph, GWidget* parent);
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;
};