1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Improvements to memory leak detection. The --backtrace=NNN option is now

recognized by tester.tcl.  Memory leak summaries are automatically written
to the file ./memleak.txt and each leak is tagged with the test in which
it occurred.  The quick.test script runs on Linux with no errors and
no leaks. (CVS 4273)

FossilOrigin-Name: 21f6b31097692171c6493e6ca6de6acbd62dc595
This commit is contained in:
drh
2007-08-23 02:47:53 +00:00
parent ed138fb3bc
commit 4a50aac564
20 changed files with 212 additions and 108 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.409 2007/08/22 11:41:18 drh Exp $
** $Id: btree.c,v 1.410 2007/08/23 02:47:53 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -1136,12 +1136,16 @@ int sqlite3BtreeOpen(
*/
if( (flags & BTREE_PRIVATE)==0
&& isMemdb==0
&& (pSqlite==0 || (pSqlite->flags &SQLITE_Vtab)==0)
&& zFilename && zFilename[0]
&& sqlite3SharedCacheEnabled
){
char *zFullPathname = (char *)sqlite3_malloc(pVfs->mxPathname);
sqlite3_mutex *mutexShared;
p->sharable = 1;
if( pSqlite ){
pSqlite->flags |= SQLITE_SharedCache;
}
if( !zFullPathname ){
sqlite3_free(p);
return SQLITE_NOMEM;