/ Check-in [75d98dae]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Do not do the bulk pcache1 allocations if SQLITE_CONFIG_PAGECACHE specifies a global page cache buffer.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | pcache-bulk-local
Files: files | file ages | folders
SHA1: 75d98dae676996a05e97b09b19e34463e8f30d51
User & Date: drh 2015-07-08 13:40:50
Context
2015-07-08
14:13
Comment fix. No changes to code. Closed-Leaf check-in: c1e2ed0e user: drh tags: pcache-bulk-local
13:40
Do not do the bulk pcache1 allocations if SQLITE_CONFIG_PAGECACHE specifies a global page cache buffer. check-in: 75d98dae user: drh tags: pcache-bulk-local
01:22
Avoid left-shifting bits into the sign of a signed integer, as such behavior is technically undefined. check-in: 9417b402 user: drh tags: pcache-bulk-local
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/pcache1.c.

698
699
700
701
702
703
704

705


706
707
708
709
710
711
712
      pCache->nMin = 10;
      pGroup->nMinPage += pCache->nMin;
      pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
    }
    pcache1LeaveMutex(pGroup);
    /* Try to initialize the local bulk pagecache line allocation if using
    ** separate caches and if nPage!=0 */

    if( pcache1.separateCache && sqlite3GlobalConfig.nPage!=0 ){


      int szBulk;
      char *zBulk;
      sqlite3BeginBenignMalloc();
      if( sqlite3GlobalConfig.nPage>0 ){
        szBulk = pCache->szAlloc * sqlite3GlobalConfig.nPage;
      }else{
        szBulk = -1024*sqlite3GlobalConfig.nPage;







>
|
>
>







698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
      pCache->nMin = 10;
      pGroup->nMinPage += pCache->nMin;
      pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
    }
    pcache1LeaveMutex(pGroup);
    /* Try to initialize the local bulk pagecache line allocation if using
    ** separate caches and if nPage!=0 */
    if( pcache1.separateCache
     && sqlite3GlobalConfig.nPage!=0
     && sqlite3GlobalConfig.pPage==0
    ){
      int szBulk;
      char *zBulk;
      sqlite3BeginBenignMalloc();
      if( sqlite3GlobalConfig.nPage>0 ){
        szBulk = pCache->szAlloc * sqlite3GlobalConfig.nPage;
      }else{
        szBulk = -1024*sqlite3GlobalConfig.nPage;