When compiling SQLite, set the SQLITE_DEFAULT_MEMSTATUS=0 compile-time option.
authorEvgeny Kotkov <[email protected]>
Tue, 20 Aug 2019 09:18:21 +0000 (20 09:18 +0000)
committerEvgeny Kotkov <[email protected]>
Tue, 20 Aug 2019 09:18:21 +0000 (20 09:18 +0000)
This is the recommended option that is not enabled by default. Setting it to
zero avoids using a mutex (and thus suffering a performance penalty) during
every sqlite3_malloc() call, where this mutex is used to properly update the
allocations stats.  We don't use sqlite3_status(), so set this option to zero.

See https://sqlite.org/compile.html#recommended_compile_time_options

* subversion/libsvn_subr/sqlite3wrapper.c
  (): Define SQLITE_DEFAULT_MEMSTATUS=0.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1865522 13f79535-47bb-0310-9956-ffa450edef68

subversion/libsvn_subr/sqlite3wrapper.c

index 9924772..750a8cd 100644 (file)
@@ -25,6 +25,7 @@
 /* Include sqlite3 inline, making all symbols private. */
 #ifdef SVN_SQLITE_INLINE
 #  define SQLITE_OMIT_DEPRECATED 1
+#  define SQLITE_DEFAULT_MEMSTATUS 0
 #  define SQLITE_API static
 #  if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
 #    pragma GCC diagnostic ignored "-Wunreachable-code"