diff options
author | drh <drh@noemail.net> | 2007-08-15 17:07:57 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2007-08-15 17:07:57 +0000 |
commit | 4c3645c601b54ef1ebcedff8ac05393dd5d71451 (patch) | |
tree | 619aefc63f1cc5564008a5eb4d8bb22e4501a2e0 /src/mem1.c | |
parent | 90f6a5beff55f81faa7135189c65cbd8a569e63c (diff) | |
download | sqlite-4c3645c601b54ef1ebcedff8ac05393dd5d71451.tar.gz sqlite-4c3645c601b54ef1ebcedff8ac05393dd5d71451.zip |
Add a debugging memory allocator. (CVS 4227)
FossilOrigin-Name: 8d2d1c4ff9dca61f75e3048107ee9712d346a28c
Diffstat (limited to 'src/mem1.c')
-rw-r--r-- | src/mem1.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mem1.c b/src/mem1.c index ba4c8e950..46732ca26 100644 --- a/src/mem1.c +++ b/src/mem1.c @@ -12,10 +12,17 @@ ** This file contains the C functions that implement a memory ** allocation subsystem for use by SQLite. ** -** $Id: mem1.c,v 1.1 2007/08/15 13:04:54 drh Exp $ +** $Id: mem1.c,v 1.2 2007/08/15 17:07:57 drh Exp $ */ /* +** This version of the memory allocator is the default. It is +** used when no other memory allocator is specified using compile-time +** macros. +*/ +#if !defined(SQLITE_MEMDEBUG) && !defined(SQLITE_OMIT_MEMORY_ALLOCATION) + +/* ** We will eventually construct multiple memory allocation subsystems ** suitable for use in various contexts: ** @@ -202,3 +209,5 @@ void *sqlite3_realloc(void *pPrior, unsigned int nBytes){ sqlite3_mutex_leave(memMutex); return (void*)p; } + +#endif /* !SQLITE_MEMDEBUG && !SQLITE_OMIT_MEMORY_ALLOCATION */ |