diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/malloc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/malloc.c b/src/malloc.c index 351a38ce3..ed2bbb383 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -12,7 +12,7 @@ ** ** Memory allocation functions used throughout sqlite. ** -** $Id: malloc.c,v 1.26 2008/07/08 19:34:07 drh Exp $ +** $Id: malloc.c,v 1.27 2008/07/14 12:30:54 drh Exp $ */ #include "sqliteInt.h" #include <stdarg.h> @@ -150,8 +150,10 @@ void sqlite3MallocEnd(void){ */ sqlite3_int64 sqlite3_memory_used(void){ int n, mx; + sqlite3_int64 res; sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, 0); - return (sqlite3_int64)n; + res = (sqlite3_int64)n; /* Work around bug in Borland C. Ticket #3216 */ + return res; } /* @@ -161,8 +163,10 @@ sqlite3_int64 sqlite3_memory_used(void){ */ sqlite3_int64 sqlite3_memory_highwater(int resetFlag){ int n, mx; + sqlite3_int64 res; sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, resetFlag); - return (sqlite3_int64)mx; + res = (sqlite3_int64)n; /* Work around bug in Borland C. Ticket #3216 */ + return res; } /* |