mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Add the SQLITE_DBSTATUS_CACHE_SIZE verb for sqlite3_db_status(). The
highwater mark does not yet work on this verb. FossilOrigin-Name: 418c6d8113bc337556b0d47acfd6a7d865d1121f
This commit is contained in:
10
src/pager.c
10
src/pager.c
@@ -4854,6 +4854,16 @@ int sqlite3PagerRefcount(Pager *pPager){
|
||||
return sqlite3PcacheRefCount(pPager->pPCache);
|
||||
}
|
||||
|
||||
/*
|
||||
** Return the approximate number of bytes of memory currently
|
||||
** used by the pager and its associated cache.
|
||||
*/
|
||||
int sqlite3PagerMemUsed(Pager *pPager){
|
||||
int perPageSize = pPager->pageSize + pPager->nExtra + 20;
|
||||
return perPageSize*sqlite3PcachePagecount(pPager->pPCache)
|
||||
+ sqlite3MallocSize(pPager);
|
||||
}
|
||||
|
||||
/*
|
||||
** Return the number of references to the specified page.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user