1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

Fix the functionality associated with sqlite3_release_memory() and sqlite3_soft_heap_limit(). It is automatically disabled if the SQLITE_CONFIG_PAGECACHE option is used. (CVS 5576)

FossilOrigin-Name: d025866b09352b32a6d35b97144eaad2fafb7165
This commit is contained in:
danielk1977
2008-08-21 12:19:44 +00:00
parent 0d3c5d3239
commit 67e3da7ad4
9 changed files with 141 additions and 105 deletions

View File

@@ -12,7 +12,7 @@
**
** Memory allocation functions used throughout sqlite.
**
** $Id: malloc.c,v 1.35 2008/08/20 14:49:24 danielk1977 Exp $
** $Id: malloc.c,v 1.36 2008/08/21 12:19:44 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
@@ -62,8 +62,11 @@ void sqlite3_soft_heap_limit(int n){
*/
int sqlite3_release_memory(int n){
#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
int nRet = sqlite3VdbeReleaseMemory(n);
nRet += sqlite3PagerReleaseMemory(n-nRet);
int nRet = 0;
#if 0
nRet += sqlite3VdbeReleaseMemory(n);
#endif
nRet += sqlite3PcacheReleaseMemory(n-nRet);
return nRet;
#else
return SQLITE_OK;