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

Unified Diff: content/browser/memory/memory_monitor_win.cc

Issue 2558043007: Fix free memory calculation. (Closed)
Patch Set: Fix integer overflow in unittest. 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
Index: content/browser/memory/memory_monitor_win.cc
diff --git a/content/browser/memory/memory_monitor_win.cc b/content/browser/memory/memory_monitor_win.cc
index aa38c673f2cc6014d0091c9666891f74cbbe27ab..bf336c16ee21536d05efd48bc6e58ee4218fecd3 100644
--- a/content/browser/memory/memory_monitor_win.cc
+++ b/content/browser/memory/memory_monitor_win.cc
@@ -44,7 +44,7 @@ MemoryMonitorWin::MemoryMonitorWin(MemoryMonitorDelegate* delegate,
int MemoryMonitorWin::GetFreeMemoryUntilCriticalMB() {
base::SystemMemoryInfoKB mem_info = {};
delegate_->GetSystemMemoryInfo(&mem_info);
- int free_mb = mem_info.free / kKBperMB;
+ int free_mb = mem_info.avail_phys / kKBperMB;
free_mb -= target_free_mb_;
return free_mb;
}

Powered by Google App Engine
This is Rietveld 408576698