]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Update comments to better documentation the new memory measurement functions.
authordrh <drh@noemail.net>
Mon, 26 Jul 2010 11:59:40 +0000 (11:59 +0000)
committerdrh <drh@noemail.net>
Mon, 26 Jul 2010 11:59:40 +0000 (11:59 +0000)
FossilOrigin-Name: 620bad035755449c4e6a762f01ef2b1d9e521c7c

manifest
manifest.uuid
src/sqlite.h.in
src/status.c
test/dbstatus.test

index 63d3b1cb9b01213930ed413007620b923d4b7501..339551f8384a702f57860567ceebb4f869bd152b 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-C Make\ssure\sall\smemory\sfrom\ssqlite3DbMalloc()\sis\sfreed\sby\ssqlite3DbFree()\nand\sall\smemory\sfrom\ssqlite3_malloc()\sis\sfreed\sby\ssqlite3_free().
-D 2010-07-26T11:07:21
+C Update\scomments\sto\sbetter\sdocumentation\sthe\snew\smemory\smeasurement\sfunctions.
+D 2010-07-26T11:59:41
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in ec08dc838fd8110fe24c92e5130bcd91cbb1ff2e
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -173,11 +173,11 @@ F src/resolve.c 1c0f32b64f8e3f555fe1f732f9d6f501a7f05706
 F src/rowset.c 69afa95a97c524ba6faf3805e717b5b7ae85a697
 F src/select.c 74fef1334bec27e606ef0b19e5c41cd0a639e69c
 F src/shell.c fd4ccdb37c3b68de0623eb938a649e0990710714
-F src/sqlite.h.in 05469b38a929b31278c7ed30b3d3f4b4e17817b6
+F src/sqlite.h.in e789728101d821fd4307208aa11e332e51eedbf9
 F src/sqlite3ext.h 69dfb8116af51b84a029cddb3b35062354270c89
 F src/sqliteInt.h 2a057459f689e23514f0ac2c414ef900f5d02a71
 F src/sqliteLimit.h 196e2f83c3b444c4548fc1874f52f84fdbda40f3
-F src/status.c ab77d17fbfe0ab800b3c54dd6853e30b1dc1634e
+F src/status.c 0fb0feca10d0b991b573a2d0cec909507388c9aa
 F src/table.c 2cd62736f845d82200acfa1287e33feb3c15d62e
 F src/tclsqlite.c ae1e4fb653c91ddad7e2534d209711a12604ccc4
 F src/test1.c ff3b4533fc4d78d1bff2ef831a5791db55096ed3
@@ -333,7 +333,7 @@ F test/createtab.test 199cf68f44e5d9e87a0b8afc7130fdeb4def3272
 F test/cse.test 277350a26264495e86b1785f34d2d0c8600e021c
 F test/ctime.test 7bd009071e242aac4f18521581536b652b789a47
 F test/date.test 6354b883f922c38046a8efbad187cc95df6da023
-F test/dbstatus.test 6e4c7a82053f8bd0e218a11f6675ea927b3b2afc
+F test/dbstatus.test 77ff0d38db69b4136a6db168c9e1b23f41276201
 F test/default.test 6faf23ccb300114924353007795aa9a8ec0aa9dc
 F test/delete.test f7629d9eb245dfca170169cc5c7a735dec34aeb4
 F test/delete2.test 3a03f2cca1f9a67ec469915cb8babd6485db43fa
@@ -841,14 +841,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 9aa30342f4de4eff630520ea8e07ad253d3f0877 ac1f37a647e9ed1c00a901d26d9956a86c40117a
-R 5e97c484f0c177ee87733094e898ae28
+P 629e38a8c9e31111e351fe4625a5835576d23584
+R 80a7d5f9fa365532b65c8e170e351383
 U drh
-Z ed9a664d8006d5d1a2fa23f0a60137f2
+Z b16bb922413ea0fca9b19fe4f93e9874
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.6 (GNU/Linux)
 
-iD8DBQFMTWxtoxKgR168RlERAp5SAKCD5Wul3MvRW/uf5JygdrrU2/cnGACfcrvh
-hDUH6H64I7jMlSjVOLsS7f8=
-=ga4H
+iD8DBQFMTXixoxKgR168RlERAl/DAJ9boDTlwMhZR5i1jAV24nxPvAFe6QCffw/4
+5JpbTS+Stpy5Ry5GR8Rpung=
+=Daaj
 -----END PGP SIGNATURE-----
index 13f8d6fc8642e7c54056089d554926e5a612042f..dc43a1dbf64316a092740121b520f0b9730e124b 100644 (file)
@@ -1 +1 @@
-629e38a8c9e31111e351fe4625a5835576d23584
\ No newline at end of file
+620bad035755449c4e6a762f01ef2b1d9e521c7c
\ No newline at end of file
index 3e18d22c4126e8c5ed96304f9fa573546da32431..89bcf1c4003f5228d3f67c356743eed51c11101a 100644 (file)
@@ -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>
 */
index 711827b50c2db672789b2e2e39ecf8ce1b38a9f8..fce355b8f4108b2adf5dec0b05c57323288f36b4 100644 (file)
@@ -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 */
index f8e17ed3b2cfa9053546d817580c7d9c4041e047..b719e8178702296582656284992a5b05830cd5c5 100644 (file)
@@ -50,7 +50,7 @@ proc lookaside {db} {
 }
 
 #---------------------------------------------------------------------------
-# Run the dbstatus-2 and dbstatus-3 tests with a couple of different
+# Run the dbstatus-2 and dbstatus-3 tests with several of different
 # lookaside buffer sizes.
 #
 foreach ::lookaside_buffer_size {0 64 120} {