diff options
author | iddqd <iddqd@yandex-team.ru> | 2022-02-10 16:49:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:46 +0300 |
commit | ff241e1daf76d79ed38015cdb76d55eb3a33ac27 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/system/info.cpp | |
parent | 07fce9c5f7771600d0b3d70e1f88fd8a7e164d85 (diff) | |
download | ydb-ff241e1daf76d79ed38015cdb76d55eb3a33ac27.tar.gz |
Restoring authorship annotation for <iddqd@yandex-team.ru>. Commit 2 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 6cb5ac8b9d..cf6681e89a 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__) |