summaryrefslogtreecommitdiff
path: root/Applications/SystemMonitor/MemoryStatsWidget.h
blob: 32b5f27bf652c3acc6e5f865fb793c11acb24c97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#include <LibCore/CFile.h>
#include <LibGUI/GWidget.h>

class GLabel;
class GraphWidget;

class MemoryStatsWidget final : public GWidget {
    C_OBJECT(MemoryStatsWidget)
public:
    MemoryStatsWidget(GraphWidget& graph, GWidget* parent);
    virtual ~MemoryStatsWidget() override;

    void refresh();

private:
    virtual void timer_event(CTimerEvent&) override;

    GraphWidget& m_graph;
    ObjectPtr<GLabel> m_user_physical_pages_label;
    ObjectPtr<GLabel> m_supervisor_physical_pages_label;
    ObjectPtr<GLabel> m_kmalloc_label;
    ObjectPtr<GLabel> m_kmalloc_count_label;
    ObjectPtr<CFile> m_proc_memstat;
};