ADC Home > Reference Library > Reference > Darwin > Miscellaneous User Space API Reference

 


xmlmemory.h

Includes:

Introduction



Typedefs


XMLCALL


typedef void (XMLCALL *xmlFreeFunc)(
    void *mem);  
Discussion

xmlFreeFunc: @mem: an already allocated block of memory

Signature for a free() implementation.


XMLCALL


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.


XMLCALL


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.


XMLCALL


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


xmlMalloc


#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.


xmlMallocAtomic


#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.


xmlMemStrdup


#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.


xmlRealloc


#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.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.
Last Updated: 2006-06-20