diff --git a/Info.hpp b/Info.hpp index 47156ca..4b35a75 100644 --- a/Info.hpp +++ b/Info.hpp @@ -12,7 +12,7 @@ namespace Columbus int GetCPUCount(); int GetCPUCacheSize(); unsigned long GetRAMSize(); - unsigned long GetRamAvaliable(); + unsigned long GetRAMFree(); int GetCPUCount() { @@ -66,6 +66,15 @@ namespace Columbus #endif } + unsigned long GetRAMFree() + { + #ifdef __linux__ + struct sysinfo info; + if (sysinfo(&info) == -1) return 0; + return info.freeram; + #endif + } + }