-C Disable\suse\sof\sHeapCompact\son\sWindows\sCE\sas\sit\sis\snot\savailable\son\sall\sversions.
-D 2013-11-08T19:51:12.210
+C Add\smore\sassert()\sstatements\sand\sfix\scompilation\sissues\swhen\sthe\sWin32\snative\sheap\sis\snot\senabled.
+D 2013-11-08T20:10:57.541
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in d12e4455cf7a36e42d3949876c1c3b88ff70867a
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/os.h 4a46270a64e9193af4a0aaa3bc2c66dc07c29b3f
F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
F src/os_unix.c 143624d9eabb3b997c59cf594e0d06c56edd43e9
-F src/os_win.c 1426ee90b58e5ea012c25e85489cf32b78019dd5
+F src/os_win.c 0b867befe5225413201099551d16f89359b514af
F src/pager.c 2aa4444ffe86e9282d03bc349a4a5e49bd77c0e8
F src/pager.h f094af9f6ececfaa8a1e93876905a4f34233fb0c
F src/parse.y 073a8294e1826f1b1656e84806b77e4199f4bb57
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
-P 37853665e75fc92b4d15e6db0b3346722527e799
-R 749df941a874c954c5ef5ef583b3e9df
+P e9694b877178572665048d1015ca033c469160e7
+R 6187da53e4e28cbae46594a31b7f6cd9
U mistachkin
-Z 5e51eb4044bf1101312438ecb7a0a945
+Z 404c44102da970339de3158c18d24f41
return 0;
}
+#ifdef SQLITE_WIN32_MALLOC
/*
** If a Win32 native heap has been configured, this function will attempt to
** compact it. Upon success, SQLITE_OK will be returned. Upon failure, one
MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); )
sqlite3_mutex_enter(pMaster);
sqlite3_mutex_enter(pMem);
- if( winMemGetOwned() && sqlite3_memory_used()==0 ){
+ winMemAssertMagic();
+ if( winMemGetHeap()!=NULL && winMemGetOwned() && sqlite3_memory_used()==0 ){
/*
** At this point, there should be no outstanding memory allocations on
** the heap. Also, since both the master and memsys locks are currently
** be able to even access the heap. Attempt to destroy and recreate our
** isolated Win32 native heap now.
*/
+ assert( winMemGetHeap()!=NULL );
+ assert( winMemGetOwned() );
+ assert( sqlite3_memory_used()==0 );
winMemShutdown(winMemGetDataPtr());
+ assert( winMemGetHeap()==NULL );
+ assert( !winMemGetOwned() );
+ assert( sqlite3_memory_used()==0 );
rc = winMemInit(winMemGetDataPtr());
+ assert( rc!=SQLITE_OK || winMemGetHeap()!=NULL );
+ assert( rc!=SQLITE_OK || winMemGetOwned() );
+ assert( rc!=SQLITE_OK || sqlite3_memory_used()==0 );
}else{
/*
** The Win32 native heap cannot be modified because it may be in use.
sqlite3_mutex_leave(pMaster);
return rc;
}
+#endif /* SQLITE_WIN32_MALLOC */
/*
** This function outputs the specified (ANSI) string to the Win32 debugger