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

Unified Diff: components/memory_pressure/direct_memory_pressure_calculator_win.cc

Issue 2558043007: Fix free memory calculation. (Closed)
Patch Set: Fix unittests on linuxes. Created 3 years, 10 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: components/memory_pressure/direct_memory_pressure_calculator_win.cc
diff --git a/components/memory_pressure/direct_memory_pressure_calculator_win.cc b/components/memory_pressure/direct_memory_pressure_calculator_win.cc
index f393b7cf54ff952d75d23e1803adf0a86aa59ca4..7de4d778d46b3bde05bf07471534cbafb1ec408c 100644
--- a/components/memory_pressure/direct_memory_pressure_calculator_win.cc
+++ b/components/memory_pressure/direct_memory_pressure_calculator_win.cc
@@ -65,7 +65,7 @@ DirectMemoryPressureCalculator::CalculateCurrentPressureLevel() {
return MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE;
// How much system memory is actively available for use right now, in MBs.
- int phys_free = mem_info.free / kKBperMB;
+ int phys_free = mem_info.available / kKBperMB;
// TODO(chrisha): This should eventually care about address space pressure,
// but the browser process (where this is running) effectively never runs out

Powered by Google App Engine
This is Rietveld 408576698