1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 07:05:08 +00:00

SystemMonitor: Re-use the /proc/all file descriptor when updating

This makes it more likely to be able to get statistics when resources
are scarce.
This commit is contained in:
Tom 2021-01-03 10:13:33 -07:00 committed by Andreas Kling
parent 1d33765e1c
commit b5437216e2
2 changed files with 2 additions and 1 deletions

View file

@ -350,7 +350,7 @@ GUI::Variant ProcessModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol
void ProcessModel::update()
{
auto previous_pid_count = m_pids.size();
auto all_processes = Core::ProcessStatisticsReader::get_all();
auto all_processes = Core::ProcessStatisticsReader::get_all(m_proc_all);
u64 last_sum_ticks_scheduled = 0;
for (auto& it : m_threads)