/usr/share/gtk-doc/html/libxml2
NameSizeModeActions
general.html54690644editdlrm
home.png6540644editdlrm
index.html43210644editdlrm
left.png4590644editdlrm
libxml2-c14n.html135460644editdlrm
libxml2-catalog.html365490644editdlrm
libxml2-chvalid.html198350644editdlrm
libxml2-debugXML.html333170644editdlrm
libxml2-dict.html135640644editdlrm
libxml2-DOCBparser.html173610644editdlrm
libxml2-encoding.html295150644editdlrm
libxml2-entities.html231260644editdlrm
libxml2-globals.html356420644editdlrm
libxml2-hash.html420570644editdlrm
libxml2-HTMLparser.html581190644editdlrm
libxml2-HTMLtree.html244160644editdlrm
libxml2-list.html255700644editdlrm
libxml2-nanoftp.html224030644editdlrm
libxml2-nanohttp.html166140644editdlrm
libxml2-parser.html1374940644editdlrm
libxml2-parserInternals.html1253570644editdlrm
libxml2-pattern.html193620644editdlrm
libxml2-relaxng.html352300644editdlrm
libxml2-SAX.html388750644editdlrm
libxml2-SAX2.html396590644editdlrm
libxml2-schemasInternals.html651200644editdlrm
libxml2-schematron.html171050644editdlrm
libxml2-threads.html128960644editdlrm
libxml2-tree.html2346010644editdlrm
libxml2-uri.html184340644editdlrm
libxml2-valid.html985040644editdlrm
libxml2-xinclude.html159200644editdlrm
libxml2-xlink.html173290644editdlrm
libxml2-xmlautomata.html351790644editdlrm
libxml2-xmlerror.html847150644editdlrm
libxml2-xmlexports.html35850644editdlrm
libxml2-xmlIO.html574960644editdlrm
libxml2-xmlmemory.html240210644editdlrm
libxml2-xmlmodule.html73700644editdlrm
libxml2-xmlreader.html1080980644editdlrm
libxml2-xmlregexp.html420120644editdlrm
libxml2-xmlsave.html148420644editdlrm
libxml2-xmlschemas.html425210644editdlrm
libxml2-xmlschemastypes.html444510644editdlrm
libxml2-xmlstring.html349710644editdlrm
libxml2-xmlunicode.html1065960644editdlrm
libxml2-xmlversion.html190260644editdlrm
libxml2-xmlwriter.html1120770644editdlrm
libxml2-xpath.html622590644editdlrm
libxml2-xpathInternals.html1449370644editdlrm
libxml2-xpointer.html255600644editdlrm
libxml2.devhelp3432830644editdlrm
right.png4720644editdlrm
style.css8200644editdlrm
up.png4060644editdlrm
Edit: /usr/share/gtk-doc/html/libxml2/libxml2-xmlmemory.html (24021B)
xmlmemory: interface for the memory allocator

xmlmemory

xmlmemory - interface for the memory allocator

provides interfaces for the memory allocator, including debugging capabilities.

Author(s): Daniel Veillard

Synopsis

#define xmlRealloc;
#define xmlMalloc;
#define xmlMallocAtomic;
#define DEBUG_MEMORY;
#define xmlMemStrdup;
void *	xmlMemRealloc			(void * ptr, 
size_t size); int xmlInitMemory (void); void xmlMemFree (void * ptr); void * xmlMemMalloc (size_t size); void xmlMemDisplayLast (FILE * fp,
long nbBytes); int xmlMemGet (xmlFreeFunc * freeFunc,
xmlMallocFunc * mallocFunc,
xmlReallocFunc * reallocFunc,
xmlStrdupFunc * strdupFunc); void xmlMemoryDump (void); void * xmlMallocLoc (size_t size,
const char * file,
int line); void xmlMemDisplay (FILE * fp); int xmlMemBlocks (void); int xmlGcMemGet (xmlFreeFunc * freeFunc,
xmlMallocFunc * mallocFunc,
xmlMallocFunc * mallocAtomicFunc,
xmlReallocFunc * reallocFunc,
xmlStrdupFunc * strdupFunc); typedef char * xmlStrdupFunc (const char * str); typedef void xmlFreeFunc (void * mem); void xmlMemShow (FILE * fp,
int nr); void * xmlMallocAtomicLoc (size_t size,
const char * file,
int line); void * xmlReallocLoc (void * ptr,
size_t size,
const char * file,
int line); void xmlCleanupMemory (void); int xmlMemUsed (void); int xmlMemSetup (xmlFreeFunc freeFunc,
xmlMallocFunc mallocFunc,
xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc); typedef void * xmlReallocFunc (void * mem,
size_t size); typedef void * xmlMallocFunc (size_t size); int xmlGcMemSetup (xmlFreeFunc freeFunc,
xmlMallocFunc mallocFunc,
xmlMallocFunc mallocAtomicFunc,
xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc); char * xmlMemoryStrdup (const char * str); char * xmlMemStrdupLoc (const char * str,
const char * file,
int line);

Description

Details

Macro DEBUG_MEMORY

#define DEBUG_MEMORY;

DEBUG_MEMORY replaces the allocator with a collect and debug shell to the libc allocator. DEBUG_MEMORY should only be activated when debugging libxml i.e. if libxml has been configured with --with-debug-mem too. #define DEBUG_MEMORY_FREED #define DEBUG_MEMORY_LOCATION







xmlGcMemGet ()

int	xmlGcMemGet			(xmlFreeFunc * freeFunc, 
xmlMallocFunc * mallocFunc,
xmlMallocFunc * mallocAtomicFunc,
xmlReallocFunc * reallocFunc,
xmlStrdupFunc * strdupFunc)

Provides the memory access functions set currently in use The mallocAtomicFunc is specialized for atomic block allocations (i.e. of areas useful for garbage collected memory allocators

freeFunc:place to save the free() function in use
mallocFunc:place to save the malloc() function in use
mallocAtomicFunc:place to save the atomic malloc() function in use
reallocFunc:place to save the realloc() function in use
strdupFunc:place to save the strdup() function in use
Returns:0 on success

xmlGcMemSetup ()

int	xmlGcMemSetup			(xmlFreeFunc freeFunc, 
xmlMallocFunc mallocFunc,
xmlMallocFunc mallocAtomicFunc,
xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc)

Override the default memory access functions with a new set This has to be called before any other libxml routines ! The mallocAtomicFunc is specialized for atomic block allocations (i.e. of areas useful for garbage collected memory allocators Should this be blocked if there was already some allocations done ?

freeFunc:the free() function to use
mallocFunc:the malloc() function to use
mallocAtomicFunc:the malloc() function to use for atomic allocations
reallocFunc:the realloc() function to use
strdupFunc:the strdup() function to use
Returns:0 on success








xmlMemGet ()

int	xmlMemGet			(xmlFreeFunc * freeFunc, 
xmlMallocFunc * mallocFunc,
xmlReallocFunc * reallocFunc,
xmlStrdupFunc * strdupFunc)

Provides the memory access functions set currently in use

freeFunc:place to save the free() function in use
mallocFunc:place to save the malloc() function in use
reallocFunc:place to save the realloc() function in use
strdupFunc:place to save the strdup() function in use
Returns:0 on success



xmlMemSetup ()

int	xmlMemSetup			(xmlFreeFunc freeFunc, 
xmlMallocFunc mallocFunc,
xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc)

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 ?

freeFunc:the free() function to use
mallocFunc:the malloc() function to use
reallocFunc:the realloc() function to use
strdupFunc:the strdup() function to use
Returns:0 on success