SQLITE3_MEMORY_USED(3) Library Functions Manual SQLITE3_MEMORY_USED(3)

sqlite3_memory_used, sqlite3_memory_highwatermemory allocator statistics

#include <sqlite3.h>

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 (), (), and () routines, which form the built-in memory allocation subsystem.

The () routine returns the number of bytes of memory currently outstanding (malloced but not freed). The () 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 sqlite3_memory_highwater() include any overhead added by SQLite in its implementation of sqlite3_malloc(), but not overhead added by the any underlying system library routines that sqlite3_malloc() may call.

The memory high-water mark is reset to the current value of () if and only if the parameter to () is true. The value returned by sqlite3_memory_highwater(1) is the high-water mark prior to the reset.

These declarations were extracted from the interface documentation at line 3075.

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

sqlite3_malloc(3)

January 24, 2024 NetBSD 11.0