/ Check-in [977ae12c]
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:Conditionally omit prototypes in pcache.h when the corresponding routines are not used. Ticket #3430. (CVS 5805)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 977ae12c365846e1bc582fd17146151953b5ed68
User & Date: drh 2008-10-11 17:42:29
Context
2008-10-11
17:51
When transfering an error message from a statement handle to the database handle so that it can be accessed by sqlite3_errmsg(), a malloc may fail. If this malloc fails, it is considered benign. (CVS 5806) check-in: 311003af user: danielk1977 tags: trunk
17:42
Conditionally omit prototypes in pcache.h when the corresponding routines are not used. Ticket #3430. (CVS 5805) check-in: 977ae12c user: drh tags: trunk
17:35
Fix to sqlite3DbMallocRaw() when SQLITE_OMIT_LOOKASIDE is defined so that once it fails it continues to fail. Add a comment explaining why this is important. (CVS 5804) check-in: 63dd8be7 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pcache.h.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This header file defines the interface that the sqlite page cache
    13     13   ** subsystem. 
    14     14   **
    15         -** @(#) $Id: pcache.h,v 1.12 2008/09/29 11:49:48 danielk1977 Exp $
           15  +** @(#) $Id: pcache.h,v 1.13 2008/10/11 17:42:29 drh Exp $
    16     16   */
    17     17   
    18     18   #ifndef _PCACHE_H_
    19     19   
    20     20   typedef struct PgHdr PgHdr;
    21     21   typedef struct PCache PCache;
    22     22   
................................................................................
   143    143   void sqlite3PcacheRef(PgHdr*);
   144    144   
   145    145   int sqlite3PcachePageRefcount(PgHdr*);
   146    146   
   147    147   /* Return the total number of pages stored in the cache */
   148    148   int sqlite3PcachePagecount(PCache*);
   149    149   
          150  +#ifdef SQLITE_CHECK_PAGES
   150    151   /* Iterate through all pages currently stored in the cache. This interface
   151    152   ** is only available if SQLITE_CHECK_PAGES is defined when the library is 
   152    153   ** built.
   153    154   */
   154    155   void sqlite3PcacheIterate(PCache *pCache, void (*xIter)(PgHdr *));
          156  +#endif
   155    157   
   156    158   /* Set and get the suggested cache-size for the specified pager-cache.
   157    159   **
   158    160   ** If no global maximum is configured, then the system attempts to limit
   159    161   ** the total number of pages cached by purgeable pager-caches to the sum
   160    162   ** of the suggested cache-sizes.
   161    163   */
   162    164   int sqlite3PcacheGetCachesize(PCache *);
   163    165   void sqlite3PcacheSetCachesize(PCache *, int);
   164    166   
          167  +#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
   165    168   /* Try to return memory used by the pcache module to the main memory heap */
   166    169   int sqlite3PcacheReleaseMemory(int);
          170  +#endif
   167    171   
          172  +#ifdef SQLITE_TEST
   168    173   void sqlite3PcacheStats(int*,int*,int*,int*);
          174  +#endif
   169    175   
   170    176   #endif /* _PCACHE_H_ */