diff options
author | iddqd <iddqd@yandex-team.ru> | 2022-02-10 16:49:45 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:45 +0300 |
commit | 07fce9c5f7771600d0b3d70e1f88fd8a7e164d85 (patch) | |
tree | e4aa4750fbb864d70f8c06cf03d2750e979ea3bf /util/system/info.cpp | |
parent | af42068bf6cd93c976b80dd0388fa48cdf65da11 (diff) | |
download | ydb-07fce9c5f7771600d0b3d70e1f88fd8a7e164d85.tar.gz |
Restoring authorship annotation for <iddqd@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/info.cpp')
-rw-r--r-- | util/system/info.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/util/system/info.cpp b/util/system/info.cpp index cf6681e89a9..6cb5ac8b9d0 100644 --- a/util/system/info.cpp +++ b/util/system/info.cpp @@ -187,7 +187,7 @@ size_t NSystemInfo::GetPageSize() noexcept { #endif } -size_t NSystemInfo::TotalMemorySize() { +size_t NSystemInfo::TotalMemorySize() { #if defined(_linux_) && defined(_64_) try { auto q = FromString<size_t>(StripString(TFileInput("/sys/fs/cgroup/memory/memory.limit_in_bytes").ReadAll())); @@ -200,9 +200,9 @@ size_t NSystemInfo::TotalMemorySize() { #endif #if defined(_linux_) || defined(_cygwin_) - struct sysinfo info; - sysinfo(&info); - return info.totalram; + struct sysinfo info; + sysinfo(&info); + return info.totalram; #elif defined(_darwin_) int mib[2]; int64_t memSize; @@ -223,10 +223,10 @@ size_t NSystemInfo::TotalMemorySize() { ythrow yexception() << "GlobalMemoryStatusEx failed: " << LastSystemErrorText(); } return (size_t)memoryStatusEx.ullTotalPhys; -#else - return 0; -#endif -} +#else + return 0; +#endif +} size_t NSystemInfo::MaxOpenFiles() { #if defined(ANDROID) || defined(__ANDROID__) |