2019-03-10 14:13:22 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibGUI/GWidget.h>
|
2019-04-18 01:57:34 +03:00
|
|
|
#include <LibCore/CFile.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 {
|
|
|
|
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-03-10 14:13:22 +03:00
|
|
|
GLabel* m_user_physical_pages_label { nullptr };
|
|
|
|
GLabel* m_supervisor_physical_pages_label { nullptr };
|
|
|
|
GLabel* m_kmalloc_label { nullptr };
|
2019-04-15 20:43:12 +03:00
|
|
|
GLabel* m_kmalloc_count_label { nullptr };
|
2019-04-18 01:57:34 +03:00
|
|
|
CFile m_proc_memstat;
|
2019-03-10 14:13:22 +03:00
|
|
|
};
|