Update comments to better documentation the new memory measurement functions.
FossilOrigin-Name: 620bad035755449c4e6a762f01ef2b1d9e521c7c
This commit is contained in:
+18
-3
@@ -5243,10 +5243,25 @@ int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
|
||||
** <dd>This parameter returns the number of lookaside memory slots currently
|
||||
** checked out.</dd>)^
|
||||
**
|
||||
** <dt>SQLITE_DBSTATUS_CACHE_USED</dt>
|
||||
** <dd>^This parameter returns the approximate number of of bytes of heap
|
||||
** memory used by all pager caches associated with the database connection.
|
||||
** ^(<dt>SQLITE_DBSTATUS_CACHE_USED</dt>
|
||||
** <dd>This parameter returns the approximate number of of bytes of heap
|
||||
** memory used by all pager caches associated with the database connection.)^
|
||||
** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0.
|
||||
**
|
||||
** ^(<dt>SQLITE_DBSTATUS_SCHEMA_USED</dt>
|
||||
** <dd>This parameter returns the approximate number of of bytes of heap
|
||||
** and lookaside memory used to store the schema for all databases associated
|
||||
** with the connection - main, temp, and any [ATTACH]-ed databases.)^
|
||||
** ^The full amount of memory used by the schemas is reported, even if the
|
||||
** schema memory is shared with other database connections due to
|
||||
** [shared cache mode] being enabled.
|
||||
** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0.
|
||||
**
|
||||
** ^(<dt>SQLITE_DBSTATUS_STMT_USED</dt>
|
||||
** <dd>This parameter returns the approximate number of of bytes of heap
|
||||
** and lookaside memory used by all prepared statements associated with
|
||||
** the database connection.)^
|
||||
** ^The highwater mark associated with SQLITE_DBSTATUS_STMT_USED is always 0.
|
||||
** </dd>
|
||||
** </dl>
|
||||
*/
|
||||
|
||||
@@ -138,6 +138,11 @@ int sqlite3_db_status(
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
** *pCurrent gets an accurate estimate of the amount of memory used
|
||||
** to store the schema for all databases (main, temp, and any ATTACHed
|
||||
** databases. *pHighwater is set to zero.
|
||||
*/
|
||||
case SQLITE_DBSTATUS_SCHEMA_USED: {
|
||||
int i; /* Used to iterate through schemas */
|
||||
int nByte = 0; /* Used to accumulate return value */
|
||||
@@ -175,6 +180,11 @@ int sqlite3_db_status(
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
** *pCurrent gets an accurate estimate of the amount of memory used
|
||||
** to store all prepared statements.
|
||||
** *pHighwater is set to zero.
|
||||
*/
|
||||
case SQLITE_DBSTATUS_STMT_USED: {
|
||||
struct Vdbe *pVdbe; /* Used to iterate through VMs */
|
||||
int nByte = 0; /* Used to accumulate return value */
|
||||
|
||||
Reference in New Issue
Block a user