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

Side by Side Diff: third_party/sqlite/patches/0004-Use-seperate-page-cache-pools-for-each-sqlite-connec.patch

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 From 22030cd2e05e746a169066c37b28c580b0a57284 Mon Sep 17 00:00:00 2001
2 From: rmcilroy <rmcilroy@chromium.org>
3 Date: Thu, 20 Jun 2013 22:50:12 +0000
4 Subject: [PATCH 04/23] Use seperate page-cache pools for each sqlite
5 connection.
6
7 Due to multiple different subsystems using sqlite, the shared global page
8 cache policy does not suite our use-cases on Chrome very well. This CL
9 enables a compile time flag to be set to disable shared cache pools.
10
11 BUG=243769
12
13 Original review URL: https://chromiumcodereview.appspot.com/17413004
14 ---
15 third_party/sqlite/src/src/pcache1.c | 8 ++++++--
16 1 file changed, 6 insertions(+), 2 deletions(-)
17
18 diff --git a/third_party/sqlite/src/src/pcache1.c b/third_party/sqlite/src/src/p cache1.c
19 index ad44395..e4d0705 100644
20 --- a/third_party/sqlite/src/src/pcache1.c
21 +++ b/third_party/sqlite/src/src/pcache1.c
22 @@ -549,10 +549,12 @@ static sqlite3_pcache *pcache1Create(int szPage, int bPurg eable){
23 int sz; /* Bytes of memory required to allocate the new cache * /
24
25 /*
26 - ** The seperateCache variable is true if each PCache has its own private
27 + ** The separateCache variable is true if each PCache has its own private
28 ** PGroup. In other words, separateCache is true for mode (1) where no
29 ** mutexing is required.
30 **
31 + ** * Always use separate caches (mode-1) if SQLITE_SEPARATE_CACHE_POOLS
32 + **
33 ** * Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT
34 **
35 ** * Always use a unified cache in single-threaded applications
36 @@ -560,7 +562,9 @@ static sqlite3_pcache *pcache1Create(int szPage, int bPurgea ble){
37 ** * Otherwise (if multi-threaded and ENABLE_MEMORY_MANAGEMENT is off)
38 ** use separate caches (mode-1)
39 */
40 -#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0
41 +#ifdef SQLITE_SEPARATE_CACHE_POOLS
42 + const int separateCache = 1;
43 +#elif defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0
44 const int separateCache = 0;
45 #else
46 int separateCache = sqlite3GlobalConfig.bCoreMutex>0;
47 --
48 2.2.1
49
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698