Mem::collect optimization

This commit is contained in:
aristocratos 2021-11-22 21:43:40 +01:00
parent e2668c60f6
commit e1074cd15b

View file

@ -730,7 +730,7 @@ namespace Mem {
ifstream meminfo(Shared::procPath / "meminfo");
if (meminfo.good()) {
bool got_avail = false;
for (string label; meminfo >> label;) {
for (string label; meminfo.peek() != 'D' and meminfo >> label;) {
if (label == "MemFree:") {
meminfo >> mem.stats.at("free");
mem.stats.at("free") <<= 10;