diff options
author | drh <drh@noemail.net> | 2008-07-28 19:34:53 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-07-28 19:34:53 +0000 |
commit | 633e6d57d92e943fbd3a52ea6627e1a1d0c338b7 (patch) | |
tree | 2a7a73f29836bc687d239754a4ff914cd4d46d27 /src/func.c | |
parent | 78bd9ca86f2d3537c2384896efe9882944222656 (diff) | |
download | sqlite-633e6d57d92e943fbd3a52ea6627e1a1d0c338b7.tar.gz sqlite-633e6d57d92e943fbd3a52ea6627e1a1d0c338b7.zip |
Implement the "lookaside" memory allocation cache. Use of this cache makes
the speed1.test script run about 15% faster. Added new interfaces to
control the cache. (CVS 5488)
FossilOrigin-Name: e48f9697e9fea339e150ddc32940760027dd07d9
Diffstat (limited to 'src/func.c')
-rw-r--r-- | src/func.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/func.c b/src/func.c index 47709caab..d4489f9d4 100644 --- a/src/func.c +++ b/src/func.c @@ -16,7 +16,7 @@ ** sqliteRegisterBuildinFunctions() found at the bottom of the file. ** All other code has file scope. ** -** $Id: func.c,v 1.195 2008/07/08 22:28:49 shane Exp $ +** $Id: func.c,v 1.196 2008/07/28 19:34:53 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -832,14 +832,14 @@ static void replaceFunc( nOut += nRep - nPattern; if( nOut>=db->aLimit[SQLITE_LIMIT_LENGTH] ){ sqlite3_result_error_toobig(context); - sqlite3_free(zOut); + sqlite3DbFree(db, zOut); return; } zOld = zOut; zOut = sqlite3_realloc(zOut, (int)nOut); if( zOut==0 ){ sqlite3_result_error_nomem(context); - sqlite3_free(zOld); + sqlite3DbFree(db, zOld); return; } memcpy(&zOut[j], zRep, nRep); |