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

Unified Diff: components/memory_pressure/direct_memory_pressure_calculator_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: 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..48ae41e6477f4cf596c45bbab4eb1e6e91b3643c 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.avail_phys / kKBperMB;
// TODO(chrisha): This should eventually care about address space pressure,
// but the browser process (where this is running) effectively never runs out
« no previous file with comments | « chrome/browser/ui/webui/about_ui.cc ('k') | components/memory_pressure/direct_memory_pressure_calculator_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698