diff options
author | drh <drh@noemail.net> | 2000-10-11 19:28:51 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2000-10-11 19:28:51 +0000 |
commit | 7c68d60b6f84bc7d04c3d7bad00327e22351ce9a (patch) | |
tree | 30882028436ef55dd2d7258e28399c8d7a6a717b /src/util.c | |
parent | d42b00f6543316d89c6377904e6ca2ad154b0f36 (diff) | |
download | sqlite-7c68d60b6f84bc7d04c3d7bad00327e22351ce9a.tar.gz sqlite-7c68d60b6f84bc7d04c3d7bad00327e22351ce9a.zip |
Misc cleanup. Notes on compiling for Win95. (CVS 152)
FossilOrigin-Name: 3f0f1fa1fce794d1661c845f1a63a8d744892c25
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/util.c b/src/util.c index a281f13c3..f9652bb54 100644 --- a/src/util.c +++ b/src/util.c @@ -26,15 +26,18 @@ ** This file contains functions for allocating memory, comparing ** strings, and stuff like that. ** -** $Id: util.c,v 1.15 2000/09/14 01:21:10 drh Exp $ +** $Id: util.c,v 1.16 2000/10/11 19:28:52 drh Exp $ */ #include "sqliteInt.h" #include <stdarg.h> #include <ctype.h> +/* +** If MEMORY_DEBUG is defined, then use versions of malloc() and +** free() that track memory usage and check for buffer overruns. +*/ #ifdef MEMORY_DEBUG - /* ** Allocate new memory and set it to zero. Return NULL if ** no memory is available. @@ -164,9 +167,14 @@ char *sqliteStrNDup_(const char *z, int n, char *zFile, int line){ } return zNew; } +#endif /* MEMORY_DEBUG */ +/* +** The following versions of malloc() and free() are for use in a +** normal build. +*/ +#if !defined(MEMORY_DEBUG) -#else /* !defined(MEMORY_DEBUG) */ /* ** Allocate new memory and set it to zero. Return NULL if ** no memory is available. @@ -219,7 +227,7 @@ char *sqliteStrNDup(const char *z, int n){ } return zNew; } -#endif /* MEMORY_DEBUG */ +#endif /* !defined(MEMORY_DEBUG) */ /* ** Create a string from the 2nd and subsequent arguments (up to the |