/ Check-in [1ba051e3]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Avoid unnecessary mutexes in the pcache1 implementation in the common case where no auxiliary page cache memory is configured.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1ba051e34d7512ab5e8fc969c1b5aaaf827b8e6493ba4235895257aca78b500f
User & Date: drh 2017-08-28 16:11:05
Context
2017-08-28
17:30
Avoid unnecessary mutexes in the pcache1 implementation in the common case where no auxiliary page cache memory is configured. check-in: 5cd9ff87 user: drh tags: begin-concurrent-branch-3.19
17:00
Add the --enable-update-limit option to the ./configure script. check-in: 64a8ae68 user: drh tags: trunk
16:11
Avoid unnecessary mutexes in the pcache1 implementation in the common case where no auxiliary page cache memory is configured. check-in: 1ba051e3 user: drh tags: trunk
15:51
Remove the rarely-used scratch memory allocator. This makes the code smaller, faster, and easier to maintain. In place of the scratch allocator, add the SQLITE_CONFIG_SMALL_MALLOC configuration option that provides a hint to SQLite that large memory allocations should be avoided. check-in: 54b00024 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pcache1.c.

   246    246   ** This routine is called from sqlite3_initialize() and so it is guaranteed
   247    247   ** to be serialized already.  There is no need for further mutexing.
   248    248   */
   249    249   void sqlite3PCacheBufferSetup(void *pBuf, int sz, int n){
   250    250     if( pcache1.isInit ){
   251    251       PgFreeslot *p;
   252    252       if( pBuf==0 ) sz = n = 0;
          253  +    if( n==0 ) sz = 0;
   253    254       sz = ROUNDDOWN8(sz);
   254    255       pcache1.szSlot = sz;
   255    256       pcache1.nSlot = pcache1.nFreeSlot = n;
   256    257       pcache1.nReserve = n>90 ? 10 : (n/10 + 1);
   257    258       pcache1.pStart = pBuf;
   258    259       pcache1.pFree = 0;
   259    260       pcache1.bUnderPressure = 0;