diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2003-09-28 18:58:27 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2003-09-28 18:58:27 +0000 |
commit | 4432df239b7aba6bff86c838e0be11d08f283b76 (patch) | |
tree | a12cc42ee7a3e819404c2b8816386f320aab812c /xmlmemory.c | |
parent | 9ee35f36437073d952bc88fd64cf1618aad27c7b (diff) | |
download | android_external_libxml2-4432df239b7aba6bff86c838e0be11d08f283b76.tar.gz android_external_libxml2-4432df239b7aba6bff86c838e0be11d08f283b76.tar.bz2 android_external_libxml2-4432df239b7aba6bff86c838e0be11d08f283b76.zip |
cleanup, creating a new legacy.c module, made sure make tests ran in
* Makefile.am: cleanup, creating a new legacy.c module,
made sure make tests ran in reduced conditions
* SAX.c SAX2.c configure.in entities.c globals.c parser.c
parserInternals.c tree.c valid.c xlink.c xmlIO.c xmlcatalog.c
xmlmemory.c xpath.c xmlmemory.c include/libxml/xmlversion.h.in:
increased the modularization, allow to configure out
validation code and legacy code, added a configuration
option --with-minimum compiling only the mandatory code
which then shrink to 200KB.
Daniel
Diffstat (limited to 'xmlmemory.c')
-rw-r--r-- | xmlmemory.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/xmlmemory.c b/xmlmemory.c index b4651feb..e20f721f 100644 --- a/xmlmemory.c +++ b/xmlmemory.c @@ -29,6 +29,7 @@ #include <ctype.h> #endif + /** * MEM_LIST: * @@ -43,6 +44,9 @@ #include <libxml/globals.h> #include <libxml/xmlerror.h> +static int xmlMemInitialized = 0; + +#ifdef DEBUG_MEMORY_LOCATION void xmlMallocBreakpoint(void); /************************************************************************ @@ -108,7 +112,6 @@ static unsigned long debugMaxMemSize = 0; static int block=0; static int xmlMemStopAtBlock = 0; static void *xmlMemTraceBlockAt = NULL; -static int xmlMemInitialized = 0; #ifdef MEM_LIST static MEMHDR *memlist = NULL; #endif @@ -712,6 +715,7 @@ static void debugmem_tag_error(void *p) static FILE *xmlMemoryDumpFile = NULL; +#endif /* DEBUG_MEMORY_LOCATION */ /** * xmlMemoryDump: @@ -722,6 +726,7 @@ static FILE *xmlMemoryDumpFile = NULL; void xmlMemoryDump(void) { +#ifdef DEBUG_MEMORY_LOCATION FILE *dump; if (debugMaxMemSize == 0) @@ -734,6 +739,7 @@ xmlMemoryDump(void) xmlMemDisplay(xmlMemoryDumpFile); if (dump != NULL) fclose(dump); +#endif /* DEBUG_MEMORY_LOCATION */ } @@ -755,14 +761,15 @@ static int xmlInitMemoryDone = 0; int xmlInitMemory(void) { - int ret; - +#ifdef DEBUG_MEMORY_LOCATION #ifdef HAVE_STDLIB_H char *breakpoint; #endif +#endif if (xmlInitMemoryDone) return(-1); +#ifdef DEBUG_MEMORY_LOCATION #ifdef HAVE_STDLIB_H breakpoint = getenv("XML_MEM_BREAKPOINT"); if (breakpoint != NULL) { @@ -775,6 +782,7 @@ xmlInitMemory(void) sscanf(breakpoint, "%p", &xmlMemTraceBlockAt); } #endif +#endif /* DEBUG_MEMORY_LOCATION */ #ifdef DEBUG_MEMORY xmlGenericError(xmlGenericErrorContext, @@ -783,8 +791,7 @@ xmlInitMemory(void) xmlMemInitialized = 1; xmlInitMemoryDone = 1; - ret = 0; - return(ret); + return(0); } /** |