summaryrefslogtreecommitdiff
path: root/Applications/ProcessManager/MemoryStatsWidget.h
blob: 2f6b1dc18320ef95dbb721ce7275f86aa681a5d3 (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
#pragma once

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

class GLabel;
class GraphWidget;

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

    void refresh();

private:
    virtual void timer_event(CTimerEvent&) override;

    GraphWidget& m_graph;
    GLabel* m_user_physical_pages_label { nullptr };
    GLabel* m_supervisor_physical_pages_label { nullptr };
    GLabel* m_kmalloc_label { nullptr };
    GLabel* m_kmalloc_count_label { nullptr };
    CFile m_proc_memstat;
};