heim-rs / heim

Cross-platform async library for system information fetching 🦀
https://heim-rs.github.io/
Apache License 2.0
902 stars 95 forks source link

Incorrect memory data #352

Open jcerato opened 3 years ago

jcerato commented 3 years ago

I noticed that memory data (RAM and SWAP) provided by Heim are higher than the ones provided by "top" or "free" commands. In particular, the total amount of RAM memory returned by this library is 16347 MB while the value returned by free or top commands is 15964 MB. The same thing seems to happen to swap memory; in fact, Heim says there are 2097 MB of total swap memory, while free command says there are 2047 MB of total swap memory. Are you already aware about this issue? Thank you so much!