1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +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

@@ -1007,6 +1007,8 @@ static void Cleanup(Vdbe *p){
void sqlite3VdbeSetNumCols(Vdbe *p, int nResColumn){
Mem *pColName;
int n;
sqlite3 *db = p->db;
releaseMemArray(p->aColName, p->nResColumn*COLNAME_N);
sqlite3_free(p->aColName);
n = nResColumn*COLNAME_N;
@@ -1014,7 +1016,9 @@ void sqlite3VdbeSetNumCols(Vdbe *p, int nResColumn){
p->aColName = pColName = (Mem*)sqlite3DbMallocZero(p->db, sizeof(Mem)*n );
if( p->aColName==0 ) return;
while( n-- > 0 ){
(pColName++)->flags = MEM_Null;
pColName->flags = MEM_Null;
pColName->db = db;
pColName++;
}
}