From: drh Date: Fri, 20 Aug 2010 09:53:19 +0000 (+0000) Subject: Disable the MEMSYS2 auxiliary routines if MEMSYS2 is changed to an alternative X-Git-Tag: version-3.7.2~10^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96dd6a16af955f9739fc4c3e01653cb1e09ec3fe;p=thirdparty%2Fsqlite.git Disable the MEMSYS2 auxiliary routines if MEMSYS2 is changed to an alternative memory allocator using SQLITE_CONFIG_MALLOC. FossilOrigin-Name: 541dd3b870f123a5fddf0b710474693566a1d659 --- diff --git a/manifest b/manifest index 0ecee5990d..4cf92718b1 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -C Fix\sthe\ssqlite3_release_memory()\sinterface\sso\sthat\sit\sdoes\snot\sattempt\nto\sfree\sSQLITE_CONFIG_PAGECACHE\smemory. -D 2010-08-20T09:14:13 +C Disable\sthe\sMEMSYS2\sauxiliary\sroutines\sif\sMEMSYS2\sis\schanged\sto\san\salternative\nmemory\sallocator\susing\sSQLITE_CONFIG_MALLOC. +D 2010-08-20T09:53:20 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 543f91f24cd7fee774ecc0a61c19704c0c3e78fd F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -142,7 +142,7 @@ F src/main.c 99622181f36d68e9f2a851c7b34263b3dcd03470 F src/malloc.c 19a468460c7df72de245f10c06bd0625777b7c83 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 F src/mem1.c 89d4ea8d5cdd55635cbaa48ad53132af6294cbb2 -F src/mem2.c 12c91260fd2320eda9355dea5445b137f848c05b +F src/mem2.c 9e5f72e38573db9598fe60d3fa530d473cc8714e F src/mem3.c 9b237d911ba9904142a804be727cc6664873f8a3 F src/mem5.c eb7a5cb98915dd7a086fa415ce3a5a0f20d0acff F src/memjournal.c 4a93a25ad9f76c40afa070ffd7187eb3a5fd7aee @@ -848,14 +848,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P b0f4796306a2cb11d6897d5c33f5da05c7473e07 -R 52b2c9daf815aabbcbe4f07fa5e7c8a1 +P 0426cd62d5ef2bd09570835c78f8fc3bcb7cdd49 +R bb794b07f256cd00b205b08f63c32658 U drh -Z 54aa36efa36980359eb0729807e35e53 +Z 9d8596e43956a79725c5c4debb4ff7e8 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) -iD8DBQFMbkdooxKgR168RlERArSaAJkBY/VKqEvxhWGtTQ3D8omuqoAsfwCgg/cl -y9J1gJoJvPaaszdEVe3Ak2I= -=hICH +iD8DBQFMblCToxKgR168RlERAtLaAJ4sNfpcsYXXZy9snzT5twUBl3oCzgCfQx37 +VI2puMgM19z9REsc6fsD1nY= +=DM/T -----END PGP SIGNATURE----- diff --git a/manifest.uuid b/manifest.uuid index e772d65077..d5927175ed 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -0426cd62d5ef2bd09570835c78f8fc3bcb7cdd49 \ No newline at end of file +541dd3b870f123a5fddf0b710474693566a1d659 \ No newline at end of file diff --git a/src/mem2.c b/src/mem2.c index 528a020f55..83f12fdb11 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 */