2019-03-10 14:13:22 +03:00
|
|
|
#pragma once
|
|
|
|
|
2019-04-18 01:57:34 +03:00
|
|
|
#include <LibCore/CFile.h>
|
2019-05-28 12:53:16 +03:00
|
|
|
#include <LibGUI/GWidget.h>
|
2019-03-10 14:13:22 +03:00
|
|
|
|
|
|
|
class GLabel;
|
2019-05-06 04:21:23 +03:00
|
|
|
class GraphWidget;
|
2019-03-10 14:13:22 +03:00
|
|
|
|
|
|
|
class MemoryStatsWidget final : public GWidget {
|
2019-09-21 19:17:23 +03:00
|
|
|
C_OBJECT(MemoryStatsWidget)
|
2019-03-10 14:13:22 +03:00
|
|
|
public:
|
2019-05-06 04:21:23 +03:00
|
|
|
MemoryStatsWidget(GraphWidget& graph, GWidget* parent);
|
2019-03-10 14:13:22 +03:00
|
|
|
virtual ~MemoryStatsWidget() override;
|
|
|
|
|
|
|
|
void refresh();
|
|
|
|
|
|
|
|
private:
|
2019-04-10 17:56:55 +03:00
|
|
|
virtual void timer_event(CTimerEvent&) override;
|
2019-03-10 14:13:22 +03:00
|
|
|
|
2019-05-06 04:21:23 +03:00
|
|
|
GraphWidget& m_graph;
|
2019-09-22 01:31:54 +03:00
|
|
|
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;
|
2019-03-10 14:13:22 +03:00
|
|
|
};
|