diff options
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index b2bf129de..0ef51f9ba 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -23,7 +23,7 @@ ************************************************************************* ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqliteInt.h,v 1.1 2000/05/29 14:26:01 drh Exp $ +** @(#) $Id: sqliteInt.h,v 1.2 2000/05/30 13:44:20 drh Exp $ */ #include "sqlite.h" #include "dbbe.h" @@ -35,6 +35,13 @@ #include <string.h> #include <assert.h> +/* #define MEMORY_DEBUG 1 */ +#ifdef MEMORY_DEBUG +# define sqliteMalloc(X) sqliteMalloc_(X,__FILE__,__LINE__) +# define sqliteFree(X) sqliteFree_(X,__FILE__,__LINE__) +# define sqliteRealloc(X,Y) sqliteRealloc_(X,Y,__FILE__,__LINE__) +#endif + /* ** The number of entries in the in-memory hash table holding the ** schema. @@ -200,9 +207,15 @@ int sqliteStrNICmp(const char *, const char *, int); int sqliteHashNoCase(const char *, int); int sqliteCompare(const char *, const char *); int sqliteSortCompare(const char *, const char *); -void *sqliteMalloc(int); -void sqliteFree(void*); -void *sqliteRealloc(void*,int); +#ifdef MEMORY_DEBUG + void *sqliteMalloc_(int,char*,int); + void sqliteFree_(void*,char*,int); + void *sqliteRealloc_(void*,int,char*,int); +#else + void *sqliteMalloc(int); + void sqliteFree(void*); + void *sqliteRealloc(void*,int); +#endif int sqliteGetToken(const char*, int *); void sqliteSetString(char **, const char *, ...); void sqliteSetNString(char **, ...); |