blob: 1cb82a6cd391b500e8adc7c77d2f4851f5c43048 [file] [log] [blame]
From 1a93d36e638db170407cd0cbdaccd30c576ad4c4 Mon Sep 17 00:00:00 2001
From: rmcilroy <rmcilroy@chromium.org>
Date: Thu, 20 Jun 2013 22:50:12 +0000
Subject: [PATCH 02/13] Use seperate page-cache pools for each sqlite
connection.
Due to multiple different subsystems using sqlite, the shared global page
cache policy does not suite our use-cases on Chrome very well. This CL
enables a compile time flag to be set to disable shared cache pools.
BUG=243769
Original review URL: https://chromiumcodereview.appspot.com/17413004
---
third_party/sqlite/src/src/pcache1.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/third_party/sqlite/src/src/pcache1.c b/third_party/sqlite/src/src/pcache1.c
index 7147f6a..940bd62 100644
--- a/third_party/sqlite/src/src/pcache1.c
+++ b/third_party/sqlite/src/src/pcache1.c
@@ -668,6 +668,8 @@ static int pcache1Init(void *NotUsed){
** private PGroup (mode-1). pcache1.separateCache is false if the single
** PGroup in pcache1.grp is used for all page caches (mode-2).
**
+ ** * Always use separate caches (mode-1) if SQLITE_SEPARATE_CACHE_POOLS
+ **
** * Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT
**
** * Use a unified cache in single-threaded applications that have
@@ -677,7 +679,9 @@ static int pcache1Init(void *NotUsed){
**
** * Otherwise use separate caches (mode-1)
*/
-#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT)
+#ifdef SQLITE_SEPARATE_CACHE_POOLS
+ pcache1.separateCache = 1;
+#elif defined(SQLITE_ENABLE_MEMORY_MANAGEMENT)
pcache1.separateCache = 0;
#elif SQLITE_THREADSAFE
pcache1.separateCache = sqlite3GlobalConfig.pPage==0
--
2.7.0.rc3.207.g0ac5344