--- parser3/src/include/pa_memory.h 2003/09/22 09:19:18 1.4 +++ parser3/src/include/pa_memory.h 2004/01/29 14:28:16 1.10 @@ -9,20 +9,17 @@ #ifndef PA_MEMORY_H #define PA_MEMORY_H -static const char* IDENT_MEMORY_H="$Date: 2003/09/22 09:19:18 $"; +static const char * const IDENT_MEMORY_H="$Date: 2004/01/29 14:28:16 $"; // include #include "pa_config_includes.h" -#include "gc.h" - - -#ifdef XML -# include "gdome.h" -// for xmlChar -# include "libxml/tree.h" +/// to debug backtrace pointers switch this on: +#ifdef _DEBUG +#define GC_DEBUG #endif +#include "gc.h" // defines @@ -66,7 +63,7 @@ inline char *pa_strdup(const char* auto_ size_t size=known_length+1; if(char *result=static_cast(pa_gc_malloc_atomic(size))) { - memcpy(result, auto_variable_never_null, size); + memcpy(result, auto_variable_never_null, known_length); result[known_length]=0; return result; }