You can call sqlite3_memory_highwater() to find the maximum amount of memory (in bytes) that your app has used.
Then you can divide this number by 2000 (the default size of a page) to determine the max number of pages that have been cached. - Richard Klein Ralf Junker wrote: > I need to retrieve the number of pages a SQLite database connection has > currently allocated in memory. The documentation unfortunately turned up no > results. I know about "PRAGMA cache_size", but this returns the maximum > number of pages possibly allowed in the cache, not the actual number of pages > currently cached. > > My aim is to calculate the accurate number of bytes actually consumed by a > single cached page. This figure will then allow to set PRAGMA cache_size to a > more precise value in order to limit memory usage. > > I do mind using undocumented APIs and will not cry tears if they change > without notice, so any pointers are welcome! > > Many thanks, > > Ralf > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users