summaryrefslogtreecommitdiff
path: root/src/pcache.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pcache.h')
-rw-r--r--src/pcache.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pcache.h b/src/pcache.h
index 33735d2..b9135fd 100644
--- a/src/pcache.h
+++ b/src/pcache.h
@@ -23,11 +23,12 @@ typedef struct PCache PCache;
** structure.
*/
struct PgHdr {
- void *pData; /* Content of this page */
+ sqlite3_pcache_page *pPage; /* Pcache object page handle */
+ void *pData; /* Page data */
void *pExtra; /* Extra content */
PgHdr *pDirty; /* Transient list of dirty pages */
- Pgno pgno; /* Page number for this page */
Pager *pPager; /* The pager this page is part of */
+ Pgno pgno; /* Page number for this page */
#ifdef SQLITE_CHECK_PAGES
u32 pageHash; /* Hash of page content */
#endif
@@ -141,6 +142,9 @@ void sqlite3PcacheSetCachesize(PCache *, int);
int sqlite3PcacheGetCachesize(PCache *);
#endif
+/* Free up as much memory as possible from the page cache */
+void sqlite3PcacheShrink(PCache*);
+
#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
/* Try to return memory used by the pcache module to the main memory heap */
int sqlite3PcacheReleaseMemory(int);