aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/mem_info.cpp
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.ru>2022-02-10 16:45:12 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:12 +0300
commit49116032d905455a7b1c994e4a696afc885c1e71 (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /util/system/mem_info.cpp
parent4e839db24a3bbc9f1c610c43d6faaaa99824dcca (diff)
downloadydb-49116032d905455a7b1c994e4a696afc885c1e71.tar.gz
Restoring authorship annotation for <thegeorg@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/mem_info.cpp')
-rw-r--r--util/system/mem_info.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/util/system/mem_info.cpp b/util/system/mem_info.cpp
index e9aa910aaf..aa51ae3b16 100644
--- a/util/system/mem_info.cpp
+++ b/util/system/mem_info.cpp
@@ -109,12 +109,12 @@ namespace NMemInfo {
#endif
#if defined(_linux_) || defined(_cygwin_)
- TString path;
- if (!pid) {
- path = "/proc/self/statm";
- } else {
- path = TStringBuilder() << TStringBuf("/proc/") << pid << TStringBuf("/statm");
- }
+ TString path;
+ if (!pid) {
+ path = "/proc/self/statm";
+ } else {
+ path = TStringBuilder() << TStringBuf("/proc/") << pid << TStringBuf("/statm");
+ }
const TString stats = TUnbufferedFileInput(path).ReadAll();
TStringBuf statsiter(stats);
@@ -143,9 +143,9 @@ namespace NMemInfo {
result.VMS = proc.ki_size;
result.RSS = proc.ki_rssize * pagesize;
#elif defined(_darwin_) && !defined(_arm_) && !defined(__IOS__)
- if (!pid) {
- pid = getpid();
- }
+ if (!pid) {
+ pid = getpid();
+ }
struct proc_taskinfo taskInfo;
const int r = proc_pidinfo(pid, PROC_PIDTASKINFO, 0, &taskInfo, sizeof(taskInfo));
@@ -157,7 +157,7 @@ namespace NMemInfo {
result.VMS = taskInfo.pti_virtual_size;
result.RSS = taskInfo.pti_resident_size;
#elif defined(__MACH__) && defined(__APPLE__)
- Y_UNUSED(pid);
+ Y_UNUSED(pid);
struct mach_task_basic_info taskInfo;
mach_msg_type_number_t infoCount = MACH_TASK_BASIC_INFO_COUNT;
@@ -170,7 +170,7 @@ namespace NMemInfo {
result.VMS = taskInfo.virtual_size;
result.RSS = taskInfo.resident_size;
#elif defined(_arm_)
- Y_UNUSED(pid);
+ Y_UNUSED(pid);
ythrow yexception() << "arm is not supported";
#endif
#elif defined(_win_)