aboutsummaryrefslogtreecommitdiff
path: root/src/malloc.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2008-08-21 12:19:44 +0000
committerdanielk1977 <danielk1977@noemail.net>2008-08-21 12:19:44 +0000
commit67e3da7ad43b63ff9efbb69565aae4ec87cf0941 (patch)
treee2b68d949e64099ab52787b7ba331ef9730062e3 /src/malloc.c
parent0d3c5d3239a658aaff40b86f5c5c7c2e64b21dc3 (diff)
downloadsqlite-67e3da7ad43b63ff9efbb69565aae4ec87cf0941.tar.gz
sqlite-67e3da7ad43b63ff9efbb69565aae4ec87cf0941.zip
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
Diffstat (limited to 'src/malloc.c')
-rw-r--r--src/malloc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/malloc.c b/src/malloc.c
index 663e44f1f..a1727e603 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -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;