1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Changes to delay freeing buffers associated with vdbe memory cells until either sqlite3_finalize() or sqlite3_release_memory() is called. (CVS 4922)

FossilOrigin-Name: 8c2f69521f13bc24cf005520efbe0589eeadd763
This commit is contained in:
danielk1977
2008-03-26 18:34:43 +00:00
parent 7e2e6dc950
commit dfb316d432
12 changed files with 234 additions and 45 deletions

View File

@@ -12,7 +12,7 @@
** Memory allocation functions used throughout sqlite.
**
**
** $Id: malloc.c,v 1.14 2007/10/20 16:36:31 drh Exp $
** $Id: malloc.c,v 1.15 2008/03/26 18:34:43 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
@@ -59,7 +59,9 @@ void sqlite3_soft_heap_limit(int n){
*/
int sqlite3_release_memory(int n){
#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
return sqlite3PagerReleaseMemory(n);
int nRet = sqlite3VdbeReleaseMemory(n);
nRet += sqlite3PagerReleaseMemory(n-nRet);
return nRet;
#else
return SQLITE_OK;
#endif