diff options
author | rmcilroy@chromium.org <rmcilroy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-18 18:49:14 +0000 |
---|---|---|
committer | rmcilroy@chromium.org <rmcilroy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-18 18:49:14 +0000 |
commit | be7995f117df5ca5d4b60d918cd419aa08724e53 (patch) | |
tree | 1e1448f36dd539797e51d079f3e42e7ad2bb56fb /sql/connection.h | |
parent | 3b0403687b604e396d57fc4eea6029b02de030ee (diff) | |
download | chromium_src-be7995f117df5ca5d4b60d918cd419aa08724e53.zip chromium_src-be7995f117df5ca5d4b60d918cd419aa08724e53.tar.gz chromium_src-be7995f117df5ca5d4b60d918cd419aa08724e53.tar.bz2 |
Adds a MemoryPressureListener to sql::Connection.
This will allow SQLite database to reduce their page cache memory on systems
which provide a MemoryPressureListener signal.
BUG=243769
Review URL: https://chromiumcodereview.appspot.com/17071007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212374 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sql/connection.h')
-rw-r--r-- | sql/connection.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/connection.h b/sql/connection.h index ab80a6c..3ee91ef 100644 --- a/sql/connection.h +++ b/sql/connection.h @@ -190,6 +190,12 @@ class SQL_EXPORT Connection { // generally exist either. void Preload(); + // Try to trim the cache memory used by the database. If |aggressively| is + // true, this function will try to free all of the cache memory it can. If + // |aggressively| is false, this function will try to cut cache memory + // usage by half. + void TrimMemory(bool aggressively); + // Raze the database to the ground. This approximates creating a // fresh database from scratch, within the constraints of SQLite's // locking protocol (locks and open handles can make doing this with |