SQLITE_STATUS_MEMORY_USED(3) | Library Functions Manual | SQLITE_STATUS_MEMORY_USED(3)

# NAME

SQLITE_STATUS_MEMORY_USED, SQLITE_STATUS_PAGECACHE_USED, SQLITE_STATUS_PAGECACHE_OVERFLOW, SQLITE_STATUS_SCRATCH_USED, SQLITE_STATUS_SCRATCH_OVERFLOW, SQLITE_STATUS_MALLOC_SIZE, SQLITE_STATUS_PARSER_STACK, SQLITE_STATUS_PAGECACHE_SIZE, SQLITE_STATUS_SCRATCH_SIZE, SQLITE_STATUS_MALLOC_COUNT — Status Parameters

# SYNOPSIS

#define SQLITE_STATUS_MEMORY_USED
#define SQLITE_STATUS_PAGECACHE_USED
#define SQLITE_STATUS_PAGECACHE_OVERFLOW
#define SQLITE_STATUS_SCRATCH_USED
#define SQLITE_STATUS_SCRATCH_OVERFLOW
#define SQLITE_STATUS_MALLOC_SIZE
#define SQLITE_STATUS_PARSER_STACK
#define SQLITE_STATUS_PAGECACHE_SIZE
#define SQLITE_STATUS_SCRATCH_SIZE
#define SQLITE_STATUS_MALLOC_COUNT

# DESCRIPTION

These integer constants designate various run-time status parameters that can be returned by sqlite3_status().

SQLITE_STATUS_MEMORY_USED
  This parameter is the current amount of memory checked out using sqlite3_malloc(), either directly or indirectly. The figure includes calls made to sqlite3_malloc() by the application and internal memory usage by the SQLite library. Scratch memory controlled by SQLITE_CONFIG_SCRATCH and auxiliary page-cache memory controlled by SQLITE_CONFIG_PAGECACHE is not included in this parameter. The amount returned is the sum of the allocation sizes as reported by the xSize method in sqlite3_mem_methods.
SQLITE_STATUS_MALLOC_SIZE
  This parameter records the largest memory allocation request handed to sqlite3_malloc() or sqlite3_realloc() (or their internal equivalents). Only the value returned in the *pHighwater parameter to sqlite3_status() is of interest. The value written into the *pCurrent parameter is undefined.
SQLITE_STATUS_MALLOC_COUNT
  This parameter records the number of separate memory allocations currently checked out.
SQLITE_STATUS_PAGECACHE_USED
  This parameter returns the number of pages used out of the pagecache memory allocator that was configured using SQLITE_CONFIG_PAGECACHE. The value returned is in pages, not in bytes.
SQLITE_STATUS_PAGECACHE_OVERFLOW
  This parameter returns the number of bytes of page cache allocation which could not be satisfied by the SQLITE_CONFIG_PAGECACHE buffer and where forced to overflow to sqlite3_malloc(). The returned value includes allocations that overflowed because they where too large (they were larger than the "sz" parameter to SQLITE_CONFIG_PAGECACHE) and allocations that overflowed because no space was left in the page cache.
SQLITE_STATUS_PAGECACHE_SIZE
  This parameter records the largest memory allocation request handed to pagecache memory allocator. Only the value returned in the *pHighwater parameter to sqlite3_status() is of interest. The value written into the *pCurrent parameter is undefined.
SQLITE_STATUS_SCRATCH_USED
  This parameter returns the number of allocations used out of the scratch memory allocator configured using SQLITE_CONFIG_SCRATCH. The value returned is in allocations, not in bytes. Since a single thread may only have one scratch allocation outstanding at time, this parameter also reports the number of threads using scratch memory at the same time.
SQLITE_STATUS_SCRATCH_OVERFLOW
  This parameter returns the number of bytes of scratch memory allocation which could not be satisfied by the SQLITE_CONFIG_SCRATCH buffer and where forced to overflow to sqlite3_malloc(). The values returned include overflows because the requested allocation was too larger (that is, because the requested allocation was larger than the "sz" parameter to SQLITE_CONFIG_SCRATCH) and because no scratch buffer slots were available.
SQLITE_STATUS_SCRATCH_SIZE
  This parameter records the largest memory allocation request handed to scratch memory allocator. Only the value returned in the *pHighwater parameter to sqlite3_status() is of interest. The value written into the *pCurrent parameter is undefined.
SQLITE_STATUS_PARSER_STACK
  The *pHighwater parameter records the deepest parser stack. The *pCurrent value is undefined. The *pHighwater value is only meaningful if SQLite is compiled with YYTRACKMAXSTACKDEPTH.

New status parameters may be added from time to time.

# SEE ALSO

sqlite3_malloc(3), sqlite3_mem_methods(3), sqlite3_malloc(3), sqlite3_status(3), SQLITE_CONFIG_SINGLETHREAD(3)

March 11, 2017 | NetBSD 8.2