aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-03-23 19:55:21 +0000
committerdrh <drh@noemail.net>2015-03-23 19:55:21 +0000
commitd741129e2b55bf1f1853cf28d0214b83f418e324 (patch)
treed3c2f560c273d9082e8ecf296f20f46a23e6c8f0 /src/sqliteInt.h
parent062cf27d0014afc0ec0b00dee2a821111a0ef121 (diff)
parent2493870d9c15769e5dbeaacd30809728e4571bbf (diff)
downloadsqlite-d741129e2b55bf1f1853cf28d0214b83f418e324.tar.gz
sqlite-d741129e2b55bf1f1853cf28d0214b83f418e324.zip
Track total memory usage using a 64-bit integer on 64-bit systems. Add
the sqlite3_status64() interface. Make the sqlite3_status() and sqlite3_status64() interfaces atomic using mutexes and verify correct mutex operation using assert() statements. FossilOrigin-Name: 6fc4e79a2350295a15ac464593ad39d904953041
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r--src/sqliteInt.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 9e174d6f4..2b1d7ebc6 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -595,6 +595,20 @@ typedef INT8_TYPE i8; /* 1-byte signed integer */
typedef INT16_TYPE LogEst;
/*
+** Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer
+*/
+#ifndef SQLITE_PTRSIZE
+# if defined(__SIZEOF_POINTER__)
+# define SQLITE_PTRSIZE __SIZEOF_POINTER__
+# elif defined(i386) || defined(__i386__) || defined(_M_IX86) || \
+ defined(_M_ARM) || defined(__arm__) || defined(__x86)
+# define SQLITE_PTRSIZE 4
+# else
+# define SQLITE_PTRSIZE 8
+# endif
+#endif
+
+/*
** Macros to determine whether the machine is big or little endian,
** and whether or not that determination is run-time or compile-time.
**
@@ -3097,10 +3111,15 @@ const sqlite3_mem_methods *sqlite3MemGetMemsys5(void);
int sqlite3MutexEnd(void);
#endif
-int sqlite3StatusValue(int);
-void sqlite3StatusAdd(int, int);
+sqlite3_int64 sqlite3StatusValue(int);
+void sqlite3StatusUp(int, int);
+void sqlite3StatusDown(int, int);
void sqlite3StatusSet(int, int);
+/* Access to mutexes used by sqlite3_status() */
+sqlite3_mutex *sqlite3Pcache1Mutex(void);
+sqlite3_mutex *sqlite3MallocMutex(void);
+
#ifndef SQLITE_OMIT_FLOATING_POINT
int sqlite3IsNaN(double);
#else