diff --git a/src/util/SystemInfo/SystemInfoLinux.cpp b/src/util/SystemInfo/SystemInfoLinux.cpp index fca3769e..07fe9aea 100644 --- a/src/util/SystemInfo/SystemInfoLinux.cpp +++ b/src/util/SystemInfo/SystemInfoLinux.cpp @@ -8,6 +8,10 @@ uint64 QueryRamUsage() { long page_size = sysconf(_SC_PAGESIZE); + if (page_size == -1) + { + return 0; + } std::ifstream file("/proc/self/statm"); if (file)