aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2010-08-20 09:53:19 +0000
committerdrh <drh@noemail.net>2010-08-20 09:53:19 +0000
commit96dd6a16af955f9739fc4c3e01653cb1e09ec3fe (patch)
treeead755af1a688555edfa4e68438860e36e305f51 /src
parentc8f503a8d33e5e100a4f53d26f31c7e4e8f78592 (diff)
downloadsqlite-96dd6a16af955f9739fc4c3e01653cb1e09ec3fe.tar.gz
sqlite-96dd6a16af955f9739fc4c3e01653cb1e09ec3fe.zip
Disable the MEMSYS2 auxiliary routines if MEMSYS2 is changed to an alternative
memory allocator using SQLITE_CONFIG_MALLOC. FossilOrigin-Name: 541dd3b870f123a5fddf0b710474693566a1d659
Diffstat (limited to 'src')
-rw-r--r--src/mem2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mem2.c b/src/mem2.c
index 528a020f5..83f12fdb1 100644
--- a/src/mem2.c
+++ b/src/mem2.c
@@ -378,7 +378,7 @@ void sqlite3MemSetDefault(void){
** Set the "type" of an allocation.
*/
void sqlite3MemdebugSetType(void *p, u8 eType){
- if( p ){
+ if( p && sqlite3GlobalConfig.m.xMalloc==sqlite3MemMalloc ){
struct MemBlockHdr *pHdr;
pHdr = sqlite3MemsysGetHeader(p);
assert( pHdr->iForeGuard==FOREGUARD );
@@ -397,7 +397,7 @@ void sqlite3MemdebugSetType(void *p, u8 eType){
*/
int sqlite3MemdebugHasType(void *p, u8 eType){
int rc = 1;
- if( p ){
+ if( p && sqlite3GlobalConfig.m.xMalloc==sqlite3MemMalloc ){
struct MemBlockHdr *pHdr;
pHdr = sqlite3MemsysGetHeader(p);
assert( pHdr->iForeGuard==FOREGUARD ); /* Allocation is valid */
@@ -419,7 +419,7 @@ int sqlite3MemdebugHasType(void *p, u8 eType){
*/
int sqlite3MemdebugNoType(void *p, u8 eType){
int rc = 1;
- if( p ){
+ if( p && sqlite3GlobalConfig.m.xMalloc==sqlite3MemMalloc ){
struct MemBlockHdr *pHdr;
pHdr = sqlite3MemsysGetHeader(p);
assert( pHdr->iForeGuard==FOREGUARD ); /* Allocation is valid */