Details
>DEBUG_MEMORY
should be activated only done when debugging libxml. It replaces the
allocator with a collect and debug shell to the libc allocator.
DEBUG_MEMORY should be activated only when debugging
libxml i.e. if libxml has been configured with --with-debug-mem too
>MEM_LIST
#define MEM_LIST /* keep a list of all the allocated memory blocks */ |
keep track of all allocated blocks for error reporting
>xmlFreeFunc ()
void (*xmlFreeFunc) (void*); |
>xmlMallocFunc ()
void* (*xmlMallocFunc) (size_t); |
>xmlReallocFunc ()
void* (*xmlReallocFunc) (void*,
size_t); |
>xmlStrdupFunc ()
char* (*xmlStrdupFunc) (const char*); |
>xmlMemSetup ()
Override the default memory access functions with a new set
This has to be called before any other libxml routines !
Should this be blocked if there was already some allocations
done ?
>xmlMemGet ()
Return the memory access functions set currently in use
>xmlInitMemory ()
int xmlInitMemory (void); |
Initialize the memory layer.
>xmlMemUsed ()
returns the amount of memory currently allocated
>xmlMemDisplay ()
void xmlMemDisplay (FILE *fp); |
show in-extenso the memory blocks allocated
>xmlMemShow ()
void xmlMemShow (FILE *fp,
int nr); |
show a show display of the memory allocated, and dump
the nr last allocated areas which were not freed
>xmlMemoryDump ()
void xmlMemoryDump (void); |
Dump in-extenso the memory blocks allocated to the file .memorylist
>xmlMalloc()
Wrapper for the malloc() function used in the XML library
>xmlRealloc()
#define xmlRealloc(ptr, size) |
Wrapper for the realloc() function used in the XML library
>xmlMemStrdup()
#define xmlMemStrdup(str) |
Wrapper for the strdup() function, xmlStrdup() is usually preferred
>xmlMallocLoc ()
void* xmlMallocLoc (size_t size,
const char *file,
int line); |
a malloc() equivalent, with logging of the allocation info.
>xmlReallocLoc ()
void* xmlReallocLoc (void *ptr,
size_t size,
const char *file,
int line); |
a realloc() equivalent, with logging of the allocation info.
>xmlMemStrdupLoc ()
char* xmlMemStrdupLoc (const char *str,
const char *file,
int line); |
a strdup() equivalent, with logging of the allocation info.