Introduction
Typedefs
typedef void (XMLCALL *xmlFreeFunc)(
void *mem);
Discussion
xmlFreeFunc:
@mem: an already allocated block of memory
Signature for a free() implementation.
typedef void *(XMLCALL *xmlMallocFunc)(
size_t size);
Discussion
xmlMallocFunc:
@size: the size requested in bytes
Signature for a malloc() implementation.
Returns a pointer to the newly allocated block or NULL in case of error.
typedef void *(XMLCALL *xmlReallocFunc)(
void *mem,
size_t size);
Discussion
xmlReallocFunc:
@mem: an already allocated block of memory
@size: the new size requested in bytes
Signature for a realloc() implementation.
Returns a pointer to the newly reallocated block or NULL in case of error.
typedef char *(XMLCALL *xmlStrdupFunc)(
const char *str);
Discussion
xmlStrdupFunc:
@str: a zero terminated string
Signature for an strdup() implementation.
Returns the copy of the string or NULL in case of error.
#defines
#define xmlMalloc(
size) xmlMallocLoc((
size), __FILE__, __LINE__)
Discussion
xmlMalloc:
@size: number of bytes to allocate
Wrapper for the malloc() function used in the XML library.
Returns the pointer to the allocated area or NULL in case of error.
#define xmlMallocAtomic(
size) xmlMallocAtomicLoc((
size), __FILE__, __LINE__)
Discussion
xmlMallocAtomic:
@size: number of bytes to allocate
Wrapper for the malloc() function used in the XML library for allocation
of block not containing pointers to other areas.
Returns the pointer to the allocated area or NULL in case of error.
#define xmlMemStrdup(
str) xmlMemStrdupLoc((
str), __FILE__, __LINE__)
Discussion
xmlMemStrdup:
@str: pointer to the existing string
Wrapper for the strdup() function, xmlStrdup() is usually preferred.
Returns the pointer to the allocated area or NULL in case of error.
#define xmlRealloc(
ptr, size) xmlReallocLoc((
ptr), (
size), __FILE__, __LINE__)
Discussion
xmlRealloc:
@ptr: pointer to the existing allocated area
@size: number of bytes to allocate
Wrapper for the realloc() function used in the XML library.
Returns the pointer to the allocated area or NULL in case of error.
|
Did this document help you? |
Yes: Tell us what works for you.
|
|
Last Updated: 2006-06-20