Memory Allocator Statistics

Memory Allocator Statistics

sqlite3_int64 sqlite3_memory_used(void);
sqlite3_int64 sqlite3_memory_highwater(int resetFlag);

SQLite provides these two interfaces for reporting on the status of the sqlite3_malloc(), sqlite3_free(), and sqlite3_realloc() routines, which form the built-in memory allocation subsystem-

The sqlite3_memory_used() routine returns the number of bytes of memory currently outstanding (malloced but not freed). The sqlite3_memory_highwater() routine returns the maximum value of sqlite3_memory_used() since the high-water mark was last reset. The values returned by sqlite3_memory_used() and 登录查看完整内容