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

ProcessManager+WindowServer: Do a little less malloc() in CPU monitor code.

This commit is contained in:
Andreas Kling 2019-04-18 03:36:33 +02:00
parent 36a6c10b09
commit e74b5bc054
2 changed files with 5 additions and 3 deletions

View file

@ -148,7 +148,8 @@ void ProcessModel::update()
auto line = file.read_line(1024);
if (line.is_empty())
break;
auto parts = String((const char*)line.pointer(), line.size() - 1, Chomp).split(',');
auto chomped = String((const char*)line.pointer(), line.size() - 1, Chomp);
auto parts = chomped.split_view(',');
if (parts.size() < 18)
break;
bool ok;