1.Dd December 19, 2018 2.Dt SQLITE_STATUS_MEMORY_USED 3 3.Os 4.Sh NAME 5.Nm SQLITE_STATUS_MEMORY_USED , 6.Nm SQLITE_STATUS_PAGECACHE_USED , 7.Nm SQLITE_STATUS_PAGECACHE_OVERFLOW , 8.Nm SQLITE_STATUS_SCRATCH_USED , 9.Nm SQLITE_STATUS_SCRATCH_OVERFLOW , 10.Nm SQLITE_STATUS_MALLOC_SIZE , 11.Nm SQLITE_STATUS_PARSER_STACK , 12.Nm SQLITE_STATUS_PAGECACHE_SIZE , 13.Nm SQLITE_STATUS_SCRATCH_SIZE , 14.Nm SQLITE_STATUS_MALLOC_COUNT 15.Nd Status Parameters 16.Sh SYNOPSIS 17.Fd #define SQLITE_STATUS_MEMORY_USED 18.Fd #define SQLITE_STATUS_PAGECACHE_USED 19.Fd #define SQLITE_STATUS_PAGECACHE_OVERFLOW 20.Fd #define SQLITE_STATUS_SCRATCH_USED 21.Fd #define SQLITE_STATUS_SCRATCH_OVERFLOW 22.Fd #define SQLITE_STATUS_MALLOC_SIZE 23.Fd #define SQLITE_STATUS_PARSER_STACK 24.Fd #define SQLITE_STATUS_PAGECACHE_SIZE 25.Fd #define SQLITE_STATUS_SCRATCH_SIZE 26.Fd #define SQLITE_STATUS_MALLOC_COUNT 27.Sh DESCRIPTION 28These integer constants designate various run-time status parameters 29that can be returned by sqlite3_status(). 30.Bl -tag -width Ds 31.It SQLITE_STATUS_MEMORY_USED 32This parameter is the current amount of memory checked out using sqlite3_malloc(), 33either directly or indirectly. 34The figure includes calls made to sqlite3_malloc() 35by the application and internal memory usage by the SQLite library. 36Auxiliary page-cache memory controlled by SQLITE_CONFIG_PAGECACHE 37is not included in this parameter. 38The amount returned is the sum of the allocation sizes as reported 39by the xSize method in sqlite3_mem_methods. 40.It SQLITE_STATUS_MALLOC_SIZE 41This parameter records the largest memory allocation request handed 42to sqlite3_malloc() or sqlite3_realloc() 43(or their internal equivalents). 44Only the value returned in the *pHighwater parameter to sqlite3_status() 45is of interest. 46The value written into the *pCurrent parameter is undefined. 47.It SQLITE_STATUS_MALLOC_COUNT 48This parameter records the number of separate memory allocations currently 49checked out. 50.It SQLITE_STATUS_PAGECACHE_USED 51This parameter returns the number of pages used out of the pagecache memory allocator 52that was configured using SQLITE_CONFIG_PAGECACHE. 53The value returned is in pages, not in bytes. 54.It SQLITE_STATUS_PAGECACHE_OVERFLOW 55This parameter returns the number of bytes of page cache allocation 56which could not be satisfied by the SQLITE_CONFIG_PAGECACHE 57buffer and where forced to overflow to sqlite3_malloc(). 58The returned value includes allocations that overflowed because they 59where too large (they were larger than the "sz" parameter to SQLITE_CONFIG_PAGECACHE) 60and allocations that overflowed because no space was left in the page 61cache. 62.It SQLITE_STATUS_PAGECACHE_SIZE 63This parameter records the largest memory allocation request handed 64to pagecache memory allocator. 65Only the value returned in the *pHighwater parameter to sqlite3_status() 66is of interest. 67The value written into the *pCurrent parameter is undefined. 68.It SQLITE_STATUS_SCRATCH_USED 69No longer used. 70.It SQLITE_STATUS_SCRATCH_OVERFLOW 71No longer used. 72.It SQLITE_STATUS_SCRATCH_SIZE 73No longer used. 74.It SQLITE_STATUS_PARSER_STACK 75The *pHighwater parameter records the deepest parser stack. 76The *pCurrent value is undefined. 77The *pHighwater value is only meaningful if SQLite is compiled with 78YYTRACKMAXSTACKDEPTH. 79.El 80.Pp 81New status parameters may be added from time to time. 82.Sh SEE ALSO 83.Xr sqlite3_malloc 3 , 84.Xr sqlite3_mem_methods 3 , 85.Xr sqlite3_malloc 3 , 86.Xr sqlite3_status 3 , 87.Xr SQLITE_CONFIG_SINGLETHREAD 3 88