mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-07 21:20:42 +00:00
fix swap detect on linux
This commit is contained in:
parent
2d447266e9
commit
6657885816
1 changed files with 1 additions and 2 deletions
|
@ -135,8 +135,7 @@ uint64_t device_swap_memory(bool available) {
|
||||||
uint64_t kb;
|
uint64_t kb;
|
||||||
iss >> key >> kb;
|
iss >> key >> kb;
|
||||||
total_swap = kb * 1024;
|
total_swap = kb * 1024;
|
||||||
}
|
} else if (line.find("SwapFree:") == 0) {
|
||||||
if (line.find("SwapFree:") == 0) {
|
|
||||||
std::istringstream iss(line);
|
std::istringstream iss(line);
|
||||||
std::string key;
|
std::string key;
|
||||||
uint64_t kb;
|
uint64_t kb;
|
||||||
|
|
Loading…
Add table
Reference in a new issue