-C Fix\san\sassertion\sfault\sthat\soccurs\swith\sSQLITE_THREADSAFE=0.\s(CVS\s5799)
-D 2008-10-11T15:20:05
+C Added\san\sassert()\sto\sdetect\slookaside\smemory\sleaks.\s\sAlso\sadded\sthe\nSQLITE_OMIT_LOOKASIDE\scompile-time\soption\swhich\sis\suseful\sin\strying\sto\ntrack\sdown\slookaside\smemory\sleaks.\s(CVS\s5800)
+D 2008-10-11T15:38:30
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 7fc26e087207e7a4a7723583dbd7997477af3b13
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/journal.c cffd2cd214e58c0e99c3ff632b3bee6c7cbb260e
F src/legacy.c aac57bd984e666059011ea01ec4383892a253be3
F src/loadext.c cadd5df14bcda5ef0c26d815eb609a755861923e
-F src/main.c eca6e80598aeccb58f722c2f1c0f25ee6b442c16
-F src/malloc.c 31f4ca218f4b664dce45ef9c4f1fcd2929c67a42
+F src/main.c 479e3b64066ac58d9957795608b0950425877f5f
+F src/malloc.c 20613ebf4664dec6eb47f62d76264b24ee2a7e4a
F src/mem1.c 5a529ff121c55ab067be14de00f86f6dcc4f4fb9
F src/mem2.c f87e681d0d1ed8436870d089332ed0d27d885b5c
F src/mem3.c 1594f117fde4cf11a6c16521f3f30af8d04bbe68
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P fab4940d54fd1e5459a3d0d9b64b491e6972fd8d
-R 8cb8a1748def7de0b4ac00aa033b0078
+P 28bba42b338afd63e1dad9f431d631f6f3027275
+R 74f64a08ff5ef738b9c92d4ed58f474f
U drh
-Z 6d1bf3ab78bfeca6642c5036493454fe
+Z 24abcbe1839acd523ab8a8985b39233b
-28bba42b338afd63e1dad9f431d631f6f3027275
\ No newline at end of file
+0c4c66071a46cecc5f87afb8f8f01ae2c90ee9b3
\ No newline at end of file
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
-** $Id: main.c,v 1.506 2008/10/11 15:20:05 drh Exp $
+** $Id: main.c,v 1.507 2008/10/11 15:38:30 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
sqlite3_mutex_leave(db->mutex);
db->magic = SQLITE_MAGIC_CLOSED;
sqlite3_mutex_free(db->mutex);
+ assert( db->lookaside.nOut==0 ); /* Fails on a lookaside memory leak */
if( db->lookaside.bMalloced ){
sqlite3_free(db->lookaside.pStart);
}
**
** Memory allocation functions used throughout sqlite.
**
-** $Id: malloc.c,v 1.42 2008/09/23 16:41:30 danielk1977 Exp $
+** $Id: malloc.c,v 1.43 2008/10/11 15:38:30 drh Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
/*
** TRUE if p is a lookaside memory allocation from db
*/
+#ifndef SQLITE_OMIT_LOOKASIDE
static int isLookaside(sqlite3 *db, void *p){
return db && p && p>=db->lookaside.pStart && p<db->lookaside.pEnd;
}
+#else
+#define isLookaside(A,B) 0
+#endif
/*
** Return the size of a memory allocation previously obtained from
*/
void *sqlite3DbMallocRaw(sqlite3 *db, int n){
void *p;
+#ifndef SQLITE_OMIT_LOOKASIDE
if( db ){
LookasideSlot *pBuf;
if( db->mallocFailed ){
return (void*)pBuf;
}
}
+#endif
p = sqlite3Malloc(n);
if( !p && db ){
db->mallocFailed = 1;