aboutsummaryrefslogtreecommitdiff
path: root/src/malloc.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2015-05-11 18:46:42 +0000
committerdan <dan@noemail.net>2015-05-11 18:46:42 +0000
commit1c1cea8baec472eb39ae92d92e2b9b1321334f9c (patch)
treeec6e360f30971e2dcb08e73ebde9a8e1c94f1e4d /src/malloc.c
parent828cdb3473fadfcd8b78251e747ab3b9df1eda4a (diff)
parentd13b2319234ddb4857b7b793ec3b26b76251a6ca (diff)
downloadsqlite-1c1cea8baec472eb39ae92d92e2b9b1321334f9c.tar.gz
sqlite-1c1cea8baec472eb39ae92d92e2b9b1321334f9c.zip
Merge latest trunk changes into this branch.
FossilOrigin-Name: 82e5a6e088c58815140ad36715ac11c96527cb25
Diffstat (limited to 'src/malloc.c')
-rw-r--r--src/malloc.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/malloc.c b/src/malloc.c
index f06e27d84..70b834579 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -226,10 +226,8 @@ void sqlite3MallocEnd(void){
** Return the amount of memory currently checked out.
*/
sqlite3_int64 sqlite3_memory_used(void){
- int n, mx;
- sqlite3_int64 res;
- sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, 0);
- res = (sqlite3_int64)n; /* Work around bug in Borland C. Ticket #3216 */
+ sqlite3_int64 res, mx;
+ sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0);
return res;
}
@@ -239,11 +237,9 @@ sqlite3_int64 sqlite3_memory_used(void){
** or since the most recent reset.
*/
sqlite3_int64 sqlite3_memory_highwater(int resetFlag){
- int n, mx;
- sqlite3_int64 res;
- sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, resetFlag);
- res = (sqlite3_int64)mx; /* Work around bug in Borland C. Ticket #3216 */
- return res;
+ sqlite3_int64 res, mx;
+ sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag);
+ return mx;
}
/*