From e73394ac9812ce87e8f01c16aa5c79833edd1c5d Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 6 Jun 2021 22:53:41 +0300 Subject: [PATCH] Add comment about meaning of Working Set and Commit Charge. --- tdutils/td/utils/port/Stat.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tdutils/td/utils/port/Stat.cpp b/tdutils/td/utils/port/Stat.cpp index a762a6209..8aab4874b 100644 --- a/tdutils/td/utils/port/Stat.cpp +++ b/tdutils/td/utils/port/Stat.cpp @@ -291,6 +291,8 @@ Result mem_stat() { return Status::Error("Call to GetProcessMemoryInfo failed"); } + // Working set = all non-virtual memory in RAM, including memory-mapped files + // PrivateUsage = Commit charge = all non-virtual memory in RAM and swap file, but not in memory-mapped files MemStat res; res.resident_size_ = counters.WorkingSetSize; res.resident_size_peak_ = counters.PeakWorkingSetSize;