mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 13:19:47 +00:00
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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user