diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 18:50:19 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 18:50:19 +0000 |
commit | 0dd5dda0318cfbe06bc73f4a24a5e6b6b8e3fc30 (patch) | |
tree | 8bff32973fdd833232139ad6ac4bec54137b12a8 /chrome/common | |
parent | 83e214c531938502ad094e440f2dfd9a48fb007a (diff) | |
download | chromium_src-0dd5dda0318cfbe06bc73f4a24a5e6b6b8e3fc30.zip chromium_src-0dd5dda0318cfbe06bc73f4a24a5e6b6b8e3fc30.tar.gz chromium_src-0dd5dda0318cfbe06bc73f4a24a5e6b6b8e3fc30.tar.bz2 |
Add framework of MemoryPurger, a class to dump memory from everywhere possible. Currently does nothing.
This also adds a "Purge memory" button to the task manager when run with --purge-memory-button, which can be used to test the functionality.
BUG=23400
TEST=Run with --purge-memory-button, open the task manager and see a new button. Click it to toggle it to "Reset purge", and click again to toggle back.
Review URL: http://codereview.chromium.org/259003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27751 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/chrome_switches.cc | 7 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index b94177d..1bbbf81 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -292,6 +292,13 @@ const wchar_t kTabCountToLoadOnSessionRestore[]= // all memory allocations during the run. const wchar_t kMemoryProfiling[] = L"memory-profile"; +// Adds a "Purge memory" button to the Task Manager, which tries to dump as much +// memory as possible. This is mostly useful for testing how well the +// MemoryPurger functionality (which is normally triggered on Suspend) works. +// +// NOTE: This is only implemented for Views. +const wchar_t kPurgeMemoryButton[] = L"purge-memory-button"; + // By default, cookies are not allowed on file://. They are needed in for // testing, for example page cycler and layout tests. See bug 1157243. const wchar_t kEnableFileCookies[] = L"enable-file-cookies"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 8774a0f..19b9b06 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -100,6 +100,7 @@ extern const wchar_t kEnableExtensionTimelineApi[]; extern const wchar_t kTabCountToLoadOnSessionRestore[]; extern const wchar_t kMemoryProfiling[]; +extern const wchar_t kPurgeMemoryButton[]; extern const wchar_t kEnableFileCookies[]; |