mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Include sqlite3_release_memory() code when SQLITE_MEMDEBUG is not defined. (CVS 2838)
FossilOrigin-Name: 77a37ceca7792e6cda6810e3387e6dda14a5c7ec
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Add\ssimple\stests\sand\sfixes\sfor\ssqlite3_soft_heap_limit()\s(CVS\s2837)
|
C Include\ssqlite3_release_memory()\scode\swhen\sSQLITE_MEMDEBUG\sis\snot\sdefined.\s(CVS\s2838)
|
||||||
D 2005-12-20T09:19:37
|
D 2005-12-20T14:38:00
|
||||||
F Makefile.in e3c6b3a38d734d41574c04f2fc90d18de2b87102
|
F Makefile.in e3c6b3a38d734d41574c04f2fc90d18de2b87102
|
||||||
F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
|
F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
|
||||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||||
@@ -82,7 +82,7 @@ F src/tokenize.c 7a3a3d3cc734f684a77c4dfd09eb46fcee25394c
|
|||||||
F src/trigger.c 2925ba96d964d9b717e74006bf7e64b8a6b70d97
|
F src/trigger.c 2925ba96d964d9b717e74006bf7e64b8a6b70d97
|
||||||
F src/update.c ec8e540617b116725b5a55c8d6b4db8bc67fdd7d
|
F src/update.c ec8e540617b116725b5a55c8d6b4db8bc67fdd7d
|
||||||
F src/utf.c b7bffac4260177ae7f83c01d025fe0f5ed70ce71
|
F src/utf.c b7bffac4260177ae7f83c01d025fe0f5ed70ce71
|
||||||
F src/util.c 7e9ebebb0c8b773490dcacd67a77fe6b6bb4e5e1
|
F src/util.c 8e0e3b1ad4f7c70706a9e76881882a409ccdb2e8
|
||||||
F src/vacuum.c fbfdd3967fd34e2f260fafed88dcbf3c10856b94
|
F src/vacuum.c fbfdd3967fd34e2f260fafed88dcbf3c10856b94
|
||||||
F src/vdbe.c 09aaed71f076bfd4286607ee4845100b910a492f
|
F src/vdbe.c 09aaed71f076bfd4286607ee4845100b910a492f
|
||||||
F src/vdbe.h 8729a4ee16ff9aeab2af9667df3cf300ff978e13
|
F src/vdbe.h 8729a4ee16ff9aeab2af9667df3cf300ff978e13
|
||||||
@@ -329,7 +329,7 @@ F www/tclsqlite.tcl ddcf912ea48695603c8ed7efb29f0812ef8d1b49
|
|||||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||||
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
|
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
|
||||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||||
P a927696ba30da39cb94ba666a10b7311d46826c9
|
P c2c5285442f4558dfca61b52f31b5a9cbefaed10
|
||||||
R 47b8829eca445dbf0a3ed9bcb5e9f642
|
R c41e18b7f54b841b391c4a1c2c7de45d
|
||||||
U danielk1977
|
U danielk1977
|
||||||
Z 8e415cd6471fe4543f7c65503e6ef9ab
|
Z 694bd7f2618622c7a35a61895f0abc86
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
c2c5285442f4558dfca61b52f31b5a9cbefaed10
|
77a37ceca7792e6cda6810e3387e6dda14a5c7ec
|
||||||
50
src/util.c
50
src/util.c
@@ -14,7 +14,7 @@
|
|||||||
** This file contains functions for allocating memory, comparing
|
** This file contains functions for allocating memory, comparing
|
||||||
** strings, and stuff like that.
|
** strings, and stuff like that.
|
||||||
**
|
**
|
||||||
** $Id: util.c,v 1.157 2005/12/20 09:19:37 danielk1977 Exp $
|
** $Id: util.c,v 1.158 2005/12/20 14:38:00 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
@@ -66,6 +66,30 @@
|
|||||||
|
|
||||||
#define MAX(x,y) ((x)>(y)?(x):(y))
|
#define MAX(x,y) ((x)>(y)?(x):(y))
|
||||||
|
|
||||||
|
#ifndef SQLITE_OMIT_MEMORY_MANAGEMENT
|
||||||
|
/*
|
||||||
|
** Set the soft heap-size limit for the current thread. Passing a negative
|
||||||
|
** value indicates no limit.
|
||||||
|
*/
|
||||||
|
void sqlite3_soft_heap_limit(sqlite_int64 n){
|
||||||
|
sqlite3Tsd()->nSoftHeapLimit = n;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Release memory held by SQLite instances created by the current thread.
|
||||||
|
*/
|
||||||
|
int sqlite3_release_memory(int n){
|
||||||
|
return sqlite3pager_release_memory(n);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
/* If SQLITE_OMIT_MEMORY_MANAGEMENT is defined, then define a version
|
||||||
|
** of sqlite3_release_memory() to be used by other code in this file.
|
||||||
|
** This is done for no better reason than to reduce the number of
|
||||||
|
** pre-processor #ifndef statements.
|
||||||
|
*/
|
||||||
|
#define sqlite3_release_memory(x) 0 /* 0 == no memory freed */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef SQLITE_MEMDEBUG
|
#ifdef SQLITE_MEMDEBUG
|
||||||
/*--------------------------------------------------------------------------
|
/*--------------------------------------------------------------------------
|
||||||
** Begin code for memory allocation system test layer.
|
** Begin code for memory allocation system test layer.
|
||||||
@@ -155,30 +179,6 @@ const char *sqlite3_malloc_id = 0;
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
#ifndef SQLITE_OMIT_MEMORY_MANAGEMENT
|
|
||||||
/*
|
|
||||||
** Set the soft heap-size limit for the current thread. Passing a negative
|
|
||||||
** value indicates no limit.
|
|
||||||
*/
|
|
||||||
void sqlite3_soft_heap_limit(sqlite_int64 n){
|
|
||||||
sqlite3Tsd()->nSoftHeapLimit = n;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Release memory held by SQLite instances created by the current thread.
|
|
||||||
*/
|
|
||||||
int sqlite3_release_memory(int n){
|
|
||||||
return sqlite3pager_release_memory(n);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
/* If SQLITE_OMIT_MEMORY_MANAGEMENT is defined, then define a version
|
|
||||||
** of sqlite3_release_memory() to be used by other code in this file.
|
|
||||||
** This is done for no better reason than to reduce the number of
|
|
||||||
** pre-processor #ifndef statements.
|
|
||||||
*/
|
|
||||||
#define sqlite3_release_memory(x) 0 /* 0 == no memory freed */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** For keeping track of the number of mallocs and frees. This
|
** For keeping track of the number of mallocs and frees. This
|
||||||
** is used to check for memory leaks. The iMallocFail and iMallocReset
|
** is used to check for memory leaks. The iMallocFail and iMallocReset
|
||||||
|
|||||||
Reference in New Issue
Block a user