| Index: third_party/sqlite/sqlite-src-3100200/src/mem1.c
|
| diff --git a/third_party/sqlite/src/src/mem1.c b/third_party/sqlite/sqlite-src-3100200/src/mem1.c
|
| similarity index 97%
|
| copy from third_party/sqlite/src/src/mem1.c
|
| copy to third_party/sqlite/sqlite-src-3100200/src/mem1.c
|
| index 11fc1771ed94128f1394040ad6edc09e8439399a..b960ccfd477368a2d0e7af46f74f7eb00a075fe2 100644
|
| --- a/third_party/sqlite/src/src/mem1.c
|
| +++ b/third_party/sqlite/sqlite-src-3100200/src/mem1.c
|
| @@ -79,9 +79,9 @@ static malloc_zone_t* _sqliteZone_;
|
| ** The malloc.h header file is needed for malloc_usable_size() function
|
| ** on some systems (e.g. Linux).
|
| */
|
| -#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLOC_USABLE_SIZE)
|
| -# define SQLITE_USE_MALLOC_H
|
| -# define SQLITE_USE_MALLOC_USABLE_SIZE
|
| +#if HAVE_MALLOC_H && HAVE_MALLOC_USABLE_SIZE
|
| +# define SQLITE_USE_MALLOC_H 1
|
| +# define SQLITE_USE_MALLOC_USABLE_SIZE 1
|
| /*
|
| ** The MSVCRT has malloc_usable_size(), but it is called _msize(). The
|
| ** use of _msize() is automatic, but can be disabled by compiling with
|
| @@ -172,10 +172,11 @@ static void sqlite3MemFree(void *pPrior){
|
| */
|
| static int sqlite3MemSize(void *pPrior){
|
| #ifdef SQLITE_MALLOCSIZE
|
| - return pPrior ? (int)SQLITE_MALLOCSIZE(pPrior) : 0;
|
| + assert( pPrior!=0 );
|
| + return (int)SQLITE_MALLOCSIZE(pPrior);
|
| #else
|
| sqlite3_int64 *p;
|
| - if( pPrior==0 ) return 0;
|
| + assert( pPrior!=0 );
|
| p = (sqlite3_int64*)pPrior;
|
| p--;
|
| return (int)p[0];
|
|
|