mirror of https://github.com/aristocratos/btop.git
Mem::collect optimization
This commit is contained in:
parent
e2668c60f6
commit
e1074cd15b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue