/ Check-in [c80e9c1a]
Login

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

Overview
Comment:Fix comments, including some documentation comments, in the page cache logic. No code changes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c80e9c1a0dc0e501b209874e147e1cb1348cb4a4
User & Date: drh 2011-01-14 15:17:55
Context
2011-01-14
16:43
Rerun autoconf to bring the configure script up-to-date. check-in: 14217464 user: drh tags: trunk
16:12
Provide an alternative and experimental pcache implementation that avoids the use of mutexes at the expense of using more memory. Closed-Leaf check-in: 2ea5bd12 user: drh tags: mutex-free-pcache
15:17
Fix comments, including some documentation comments, in the page cache logic. No code changes. check-in: c80e9c1a user: drh tags: trunk
11:51
Fix a bug in test code (test_vfs.c). check-in: 772a3845 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

install-sh became executable.


Changes to src/pcache1.c.

   684    684     assert( pPage->pLruPrev==0 && pPage->pLruNext==0 );
   685    685     assert( pcache1.pLruHead!=pPage && pcache1.pLruTail!=pPage );
   686    686   
   687    687     if( reuseUnlikely || pcache1.nCurrentPage>pcache1.nMaxPage ){
   688    688       pcache1RemoveFromHash(pPage);
   689    689       pcache1FreePage(pPage);
   690    690     }else{
   691         -    /* Add the page to the global LRU list. Normally, the page is added to
   692         -    ** the head of the list (last page to be recycled). However, if the 
   693         -    ** reuseUnlikely flag passed to this function is true, the page is added
   694         -    ** to the tail of the list (first page to be recycled).
   695         -    */
          691  +    /* Add the page to the global LRU list. */
   696    692       if( pcache1.pLruHead ){
   697    693         pcache1.pLruHead->pLruPrev = pPage;
   698    694         pPage->pLruNext = pcache1.pLruHead;
   699    695         pcache1.pLruHead = pPage;
   700    696       }else{
   701    697         pcache1.pLruTail = pPage;
   702    698         pcache1.pLruHead = pPage;

Changes to src/sqlite.h.in.

  5733   5733   ** 8-byte boundary. The page to be fetched is determined by the key. ^The
  5734   5734   ** mimimum key value is 1.  After it has been retrieved using xFetch, the page 
  5735   5735   ** is considered to be "pinned".
  5736   5736   **
  5737   5737   ** If the requested page is already in the page cache, then the page cache
  5738   5738   ** implementation must return a pointer to the page buffer with its content
  5739   5739   ** intact.  If the requested page is not already in the cache, then the
  5740         -** behavior of the cache implementation should use the value of the createFlag
         5740  +** cache implementation should use the value of the createFlag
  5741   5741   ** parameter to help it determined what action to take:
  5742   5742   **
  5743   5743   ** <table border=1 width=85% align=center>
  5744   5744   ** <tr><th> createFlag <th> Behaviour when page is not already in cache
  5745   5745   ** <tr><td> 0 <td> Do not allocate a new page.  Return NULL.
  5746   5746   ** <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.
  5747   5747   **                 Otherwise return NULL.

test/progress.test became a regular file.


tool/mkopts.tcl became a regular file.