From 7a11bb8eef610176358d15b11dc1d7cf3c8bf2e5 Mon Sep 17 00:00:00 2001 From: chrisha Date: Fri, 8 May 2015 08:39:40 -0700 Subject: Create base::win::MemoryPressureMonitor class. This CL creates a polling-based memory pressure monitor for Windows, analogous to that on ChromeOS. BUG=463603,472772 Review URL: https://codereview.chromium.org/1122863005 Cr-Commit-Position: refs/heads/master@{#328961} --- content/public/common/content_switches.cc | 6 ++++++ content/public/common/content_switches.h | 1 + 2 files changed, 7 insertions(+) (limited to 'content/public') diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc index e0a0e33..f264701 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc @@ -986,6 +986,12 @@ const char kEnableWin32kRendererLockDown[] = // clashes between different instances of Chrome. const char kFontCacheSharedMemSuffix[] = "font-cache-shared-mem-suffix"; +// Sets the free memory thresholds below which the system is considered to be +// under moderate and critical memory pressure. Used in the browser process, +// and ignored if invalid. Specified as a pair of comma separated integers. +// See base/win/memory_pressure_monitor.cc for defaults. +const char kMemoryPressureThresholdsMb[] = "memory-pressure-thresholds-mb"; + // Enables the exporting of the tracing events to ETW. This is only supported on // Windows Vista and later. const char kTraceExportEventsToETW[] = "trace-export-events-to-etw"; diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h index b5e9e87..d6f1635 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h @@ -295,6 +295,7 @@ CONTENT_EXPORT extern const char kEnableWin32kRendererLockDown[]; // Switch to uniquely identify names shared memory section for font cache // across chromium flavors. CONTENT_EXPORT extern const char kFontCacheSharedMemSuffix[]; +CONTENT_EXPORT extern const char kMemoryPressureThresholdsMb[]; CONTENT_EXPORT extern const char kTraceExportEventsToETW[]; #endif -- cgit v1.1