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

Disable the MEMSYS2 auxiliary routines if MEMSYS2 is changed to an alternative

memory allocator using SQLITE_CONFIG_MALLOC.

FossilOrigin-Name: 541dd3b870f123a5fddf0b710474693566a1d659
This commit is contained in:
drh
2010-08-20 09:53:19 +00:00
parent c8f503a8d3
commit 96dd6a16af
3 changed files with 13 additions and 13 deletions

View File

@@ -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 */