SystemMonitor: Show information about purgeable memory

This patch exposes some fields about purgeable memory regions.
We now also show total purgeable volatile and non-volatile memory in
the big process table.
This commit is contained in:
Andreas Kling 2019-12-09 19:16:58 +01:00
parent dfc5eb2b6d
commit 92b46d9814
Notes: sideshowbarker 2024-07-19 10:54:35 +09:00
5 changed files with 33 additions and 0 deletions

View file

@ -30,6 +30,13 @@ ProcessMemoryMapWidget::ProcessMemoryMapWidget(GWidget* parent)
builder.append('T');
return builder.to_string();
});
pid_vm_fields.empend("Purgeable", TextAlignment::CenterLeft, [](auto& object) {
if (!object.get("purgeable").to_bool())
return "";
if (object.get("volatile").to_bool())
return "Volatile";
return "Non-volatile";
});
pid_vm_fields.empend("name", "Name", TextAlignment::CenterLeft);
m_json_model = GJsonArrayModel::create({}, move(pid_vm_fields));
m_table_view->set_model(GSortingProxyModel::create(*m_json_model));