/ Check-in [0da292da]
Login

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

Overview
Comment:Ifdef out routines in pcache1.c that are used only when SQLITE_PAGECACHE_BLOCKALLOC is defined.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0da292da3bc867a5c6e29384f325581ea06bbd20
User & Date: drh 2011-08-23 13:27:48
Context
2011-08-23
16:41
Have the "crash" VFS used by the tcl tests (test6.c) handle SQLITE_FCNTL_SIZE_HINT internally, instead of passing it directly through to the underlying VFS. This is important if the crash VFS is simulating non-default device characteristics such as SQLITE_DEVCAP_SEQUENTIAL or ATOMIC. check-in: fac8bc8f user: dan tags: trunk
13:27
Ifdef out routines in pcache1.c that are used only when SQLITE_PAGECACHE_BLOCKALLOC is defined. check-in: 0da292da user: drh tags: trunk
12:50
Merge the PAGECACHE_BLOCKALLOC changes into trunk. check-in: 768c1846 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pcache1.c.

   348    348       iSize = sqlite3MallocSize(p);
   349    349       sqlite3MemdebugSetType(p, MEMTYPE_PCACHE);
   350    350       return iSize;
   351    351     }
   352    352   }
   353    353   #endif /* SQLITE_ENABLE_MEMORY_MANAGEMENT */
   354    354   
          355  +#ifdef SQLITE_PAGECACHE_BLOCKALLOC
   355    356   /*
   356    357   ** The block pBlock belongs to list pList but is not currently linked in.
   357    358   ** Insert it into the start of the list.
   358    359   */
   359    360   static void addBlockToList(PGroupBlockList *pList, PGroupBlock *pBlock){
   360    361     pBlock->pPrev = 0;
   361    362     pBlock->pNext = pList->pFirst;
................................................................................
   377    378     if( pList->pFirst==0 ){
   378    379       PGroupBlockList **pp;
   379    380       for(pp=&pGroup->pBlockList; *pp!=pList; pp=&(*pp)->pNext);
   380    381       *pp = (*pp)->pNext;
   381    382       sqlite3_free(pList);
   382    383     }
   383    384   }
          385  +#endif /* SQLITE_PAGECACHE_BLOCKALLOC */
   384    386   
   385    387   /*
   386    388   ** Allocate a new page object initially associated with cache pCache.
   387    389   */
   388    390   static PgHdr1 *pcache1AllocPage(PCache1 *pCache){
   389    391     int nByte = sizeof(PgHdr1) + pCache->szPage;
   390    392     void *pPg = 0;