Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4058)

Unified Diff: base/process/process_metrics_win.cc

Issue 2766623002: Revert of Fix free memory calculation. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process/process_metrics_unittest.cc ('k') | base/sys_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_metrics_win.cc
diff --git a/base/process/process_metrics_win.cc b/base/process/process_metrics_win.cc
index 6f1fe13f1fa0dd4c11dff42b6285bce6e7b52f83..d2f0c935531071a092289637b9696a744c22ea9a 100644
--- a/base/process/process_metrics_win.cc
+++ b/base/process/process_metrics_win.cc
@@ -30,6 +30,12 @@
PULONG ReturnLength);
} // namespace
+
+SystemMemoryInfoKB::SystemMemoryInfoKB()
+ : total(0), free(0), swap_total(0), swap_free(0) {}
+
+SystemMemoryInfoKB::SystemMemoryInfoKB(const SystemMemoryInfoKB& other) =
+ default;
ProcessMetrics::~ProcessMetrics() { }
@@ -343,7 +349,7 @@
// This function uses the following mapping between MEMORYSTATUSEX and
// SystemMemoryInfoKB:
// ullTotalPhys ==> total
-// ullAvailPhys ==> avail_phys
+// ullAvailPhys ==> free
// ullTotalPageFile ==> swap_total
// ullAvailPageFile ==> swap_free
bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) {
@@ -353,7 +359,7 @@
return false;
meminfo->total = mem_status.ullTotalPhys / 1024;
- meminfo->avail_phys = mem_status.ullAvailPhys / 1024;
+ meminfo->free = mem_status.ullAvailPhys / 1024;
meminfo->swap_total = mem_status.ullTotalPageFile / 1024;
meminfo->swap_free = mem_status.ullAvailPageFile / 1024;
« no previous file with comments | « base/process/process_metrics_unittest.cc ('k') | base/sys_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698