1*7c568831SAndroid Build Coastguard Worker<html> 2*7c568831SAndroid Build Coastguard Worker<head> 3*7c568831SAndroid Build Coastguard Worker<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4*7c568831SAndroid Build Coastguard Worker<title>xmlmemory: interface for the memory allocator</title> 5*7c568831SAndroid Build Coastguard Worker<meta name="generator" content="Libxml2 devhelp stylesheet"> 6*7c568831SAndroid Build Coastguard Worker<link rel="start" href="index.html" title="libxml2 Reference Manual"> 7*7c568831SAndroid Build Coastguard Worker<link rel="up" href="general.html" title="API"> 8*7c568831SAndroid Build Coastguard Worker<link rel="stylesheet" href="style.css" type="text/css"> 9*7c568831SAndroid Build Coastguard Worker<link rel="chapter" href="general.html" title="API"> 10*7c568831SAndroid Build Coastguard Worker</head> 11*7c568831SAndroid Build Coastguard Worker<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 12*7c568831SAndroid Build Coastguard Worker<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> 13*7c568831SAndroid Build Coastguard Worker<td><a accesskey="p" href="libxml2-xmlexports.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> 14*7c568831SAndroid Build Coastguard Worker<td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> 15*7c568831SAndroid Build Coastguard Worker<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> 16*7c568831SAndroid Build Coastguard Worker<td><a accesskey="n" href="libxml2-xmlmodule.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> 17*7c568831SAndroid Build Coastguard Worker<th width="100%" align="center">libxml2 Reference Manual</th> 18*7c568831SAndroid Build Coastguard Worker</tr></table> 19*7c568831SAndroid Build Coastguard Worker<h2><span class="refentrytitle">xmlmemory</span></h2> 20*7c568831SAndroid Build Coastguard Worker<p>xmlmemory - interface for the memory allocator</p> 21*7c568831SAndroid Build Coastguard Worker<p>provides interfaces for the memory allocator, including debugging capabilities. </p> 22*7c568831SAndroid Build Coastguard Worker<p>Author(s): Daniel Veillard </p> 23*7c568831SAndroid Build Coastguard Worker<div class="refsynopsisdiv"> 24*7c568831SAndroid Build Coastguard Worker<h2>Synopsis</h2> 25*7c568831SAndroid Build Coastguard Worker<pre class="synopsis">void <a href="#xmlCleanupMemory">xmlCleanupMemory</a> (void); 26*7c568831SAndroid Build Coastguard Workertypedef void <a href="#xmlFreeFunc">xmlFreeFunc</a> (void * mem); 27*7c568831SAndroid Build Coastguard Workerint <a href="#xmlGcMemGet">xmlGcMemGet</a> (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> * freeFunc, <br> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocAtomicFunc, <br> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> * reallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> * strdupFunc); 28*7c568831SAndroid Build Coastguard Workerint <a href="#xmlGcMemSetup">xmlGcMemSetup</a> (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc, <br> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocAtomicFunc, <br> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc); 29*7c568831SAndroid Build Coastguard Workerint <a href="#xmlInitMemory">xmlInitMemory</a> (void); 30*7c568831SAndroid Build Coastguard Workervoid * <a href="#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a> (size_t size, <br> const char * file, <br> int line); 31*7c568831SAndroid Build Coastguard Workertypedef void * <a href="#xmlMallocFunc">xmlMallocFunc</a> (size_t size); 32*7c568831SAndroid Build Coastguard Workervoid * <a href="#xmlMallocLoc">xmlMallocLoc</a> (size_t size, <br> const char * file, <br> int line); 33*7c568831SAndroid Build Coastguard Workerint <a href="#xmlMemBlocks">xmlMemBlocks</a> (void); 34*7c568831SAndroid Build Coastguard Workervoid <a href="#xmlMemDisplay">xmlMemDisplay</a> (FILE * fp); 35*7c568831SAndroid Build Coastguard Workervoid <a href="#xmlMemDisplayLast">xmlMemDisplayLast</a> (FILE * fp, <br> long nbBytes); 36*7c568831SAndroid Build Coastguard Workervoid <a href="#xmlMemFree">xmlMemFree</a> (void * ptr); 37*7c568831SAndroid Build Coastguard Workerint <a href="#xmlMemGet">xmlMemGet</a> (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> * freeFunc, <br> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> * reallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> * strdupFunc); 38*7c568831SAndroid Build Coastguard Workervoid * <a href="#xmlMemMalloc">xmlMemMalloc</a> (size_t size); 39*7c568831SAndroid Build Coastguard Workervoid * <a href="#xmlMemRealloc">xmlMemRealloc</a> (void * ptr, <br> size_t size); 40*7c568831SAndroid Build Coastguard Workerint <a href="#xmlMemSetup">xmlMemSetup</a> (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc, <br> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc); 41*7c568831SAndroid Build Coastguard Workervoid <a href="#xmlMemShow">xmlMemShow</a> (FILE * fp, <br> int nr); 42*7c568831SAndroid Build Coastguard Workersize_t <a href="#xmlMemSize">xmlMemSize</a> (void * ptr); 43*7c568831SAndroid Build Coastguard Workerchar * <a href="#xmlMemStrdupLoc">xmlMemStrdupLoc</a> (const char * str, <br> const char * file, <br> int line); 44*7c568831SAndroid Build Coastguard Workerint <a href="#xmlMemUsed">xmlMemUsed</a> (void); 45*7c568831SAndroid Build Coastguard Workervoid <a href="#xmlMemoryDump">xmlMemoryDump</a> (void); 46*7c568831SAndroid Build Coastguard Workerchar * <a href="#xmlMemoryStrdup">xmlMemoryStrdup</a> (const char * str); 47*7c568831SAndroid Build Coastguard Workertypedef void * <a href="#xmlReallocFunc">xmlReallocFunc</a> (void * mem, <br> size_t size); 48*7c568831SAndroid Build Coastguard Workervoid * <a href="#xmlReallocLoc">xmlReallocLoc</a> (void * ptr, <br> size_t size, <br> const char * file, <br> int line); 49*7c568831SAndroid Build Coastguard Workertypedef char * <a href="#xmlStrdupFunc">xmlStrdupFunc</a> (const char * str); 50*7c568831SAndroid Build Coastguard Worker</pre> 51*7c568831SAndroid Build Coastguard Worker</div> 52*7c568831SAndroid Build Coastguard Worker<div class="refsect1" lang="en"><h2>Description</h2></div> 53*7c568831SAndroid Build Coastguard Worker<div class="refsect1" lang="en"> 54*7c568831SAndroid Build Coastguard Worker<h2>Details</h2> 55*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 56*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 57*7c568831SAndroid Build Coastguard Worker<h3> 58*7c568831SAndroid Build Coastguard Worker<a name="xmlFreeFunc"></a>Function type xmlFreeFunc</h3> 59*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void xmlFreeFunc (void * mem)<br> 60*7c568831SAndroid Build Coastguard Worker</pre> 61*7c568831SAndroid Build Coastguard Worker<p>Signature for a free() implementation.</p> 62*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 63*7c568831SAndroid Build Coastguard Worker<col align="left"> 64*7c568831SAndroid Build Coastguard Worker<tbody><tr> 65*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>mem</tt></i>:</span></td> 66*7c568831SAndroid Build Coastguard Worker<td>an already allocated block of memory</td> 67*7c568831SAndroid Build Coastguard Worker</tr></tbody> 68*7c568831SAndroid Build Coastguard Worker</table></div> 69*7c568831SAndroid Build Coastguard Worker</div> 70*7c568831SAndroid Build Coastguard Worker<hr> 71*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 72*7c568831SAndroid Build Coastguard Worker<h3> 73*7c568831SAndroid Build Coastguard Worker<a name="xmlMallocFunc"></a>Function type xmlMallocFunc</h3> 74*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void * xmlMallocFunc (size_t size)<br> 75*7c568831SAndroid Build Coastguard Worker</pre> 76*7c568831SAndroid Build Coastguard Worker<p>Signature for a malloc() implementation.</p> 77*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 78*7c568831SAndroid Build Coastguard Worker<col align="left"> 79*7c568831SAndroid Build Coastguard Worker<tbody> 80*7c568831SAndroid Build Coastguard Worker<tr> 81*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>size</tt></i>:</span></td> 82*7c568831SAndroid Build Coastguard Worker<td>the size requested in bytes</td> 83*7c568831SAndroid Build Coastguard Worker</tr> 84*7c568831SAndroid Build Coastguard Worker<tr> 85*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 86*7c568831SAndroid Build Coastguard Worker<td>a pointer to the newly allocated block or NULL in case of error.</td> 87*7c568831SAndroid Build Coastguard Worker</tr> 88*7c568831SAndroid Build Coastguard Worker</tbody> 89*7c568831SAndroid Build Coastguard Worker</table></div> 90*7c568831SAndroid Build Coastguard Worker</div> 91*7c568831SAndroid Build Coastguard Worker<hr> 92*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 93*7c568831SAndroid Build Coastguard Worker<h3> 94*7c568831SAndroid Build Coastguard Worker<a name="xmlReallocFunc"></a>Function type xmlReallocFunc</h3> 95*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void * xmlReallocFunc (void * mem, <br> size_t size)<br> 96*7c568831SAndroid Build Coastguard Worker</pre> 97*7c568831SAndroid Build Coastguard Worker<p>Signature for a realloc() implementation.</p> 98*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 99*7c568831SAndroid Build Coastguard Worker<col align="left"> 100*7c568831SAndroid Build Coastguard Worker<tbody> 101*7c568831SAndroid Build Coastguard Worker<tr> 102*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>mem</tt></i>:</span></td> 103*7c568831SAndroid Build Coastguard Worker<td>an already allocated block of memory</td> 104*7c568831SAndroid Build Coastguard Worker</tr> 105*7c568831SAndroid Build Coastguard Worker<tr> 106*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>size</tt></i>:</span></td> 107*7c568831SAndroid Build Coastguard Worker<td>the new size requested in bytes</td> 108*7c568831SAndroid Build Coastguard Worker</tr> 109*7c568831SAndroid Build Coastguard Worker<tr> 110*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 111*7c568831SAndroid Build Coastguard Worker<td>a pointer to the newly reallocated block or NULL in case of error.</td> 112*7c568831SAndroid Build Coastguard Worker</tr> 113*7c568831SAndroid Build Coastguard Worker</tbody> 114*7c568831SAndroid Build Coastguard Worker</table></div> 115*7c568831SAndroid Build Coastguard Worker</div> 116*7c568831SAndroid Build Coastguard Worker<hr> 117*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 118*7c568831SAndroid Build Coastguard Worker<h3> 119*7c568831SAndroid Build Coastguard Worker<a name="xmlStrdupFunc"></a>Function type xmlStrdupFunc</h3> 120*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">char * xmlStrdupFunc (const char * str)<br> 121*7c568831SAndroid Build Coastguard Worker</pre> 122*7c568831SAndroid Build Coastguard Worker<p>Signature for an strdup() implementation.</p> 123*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 124*7c568831SAndroid Build Coastguard Worker<col align="left"> 125*7c568831SAndroid Build Coastguard Worker<tbody> 126*7c568831SAndroid Build Coastguard Worker<tr> 127*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>str</tt></i>:</span></td> 128*7c568831SAndroid Build Coastguard Worker<td>a zero terminated string</td> 129*7c568831SAndroid Build Coastguard Worker</tr> 130*7c568831SAndroid Build Coastguard Worker<tr> 131*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 132*7c568831SAndroid Build Coastguard Worker<td>the copy of the string or NULL in case of error.</td> 133*7c568831SAndroid Build Coastguard Worker</tr> 134*7c568831SAndroid Build Coastguard Worker</tbody> 135*7c568831SAndroid Build Coastguard Worker</table></div> 136*7c568831SAndroid Build Coastguard Worker</div> 137*7c568831SAndroid Build Coastguard Worker<hr> 138*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 139*7c568831SAndroid Build Coastguard Worker<h3> 140*7c568831SAndroid Build Coastguard Worker<a name="xmlFree">Variable </a>xmlFree</h3> 141*7c568831SAndroid Build Coastguard Worker<pre class="programlisting"><a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> xmlFree; 142*7c568831SAndroid Build Coastguard Worker</pre> 143*7c568831SAndroid Build Coastguard Worker<p>@mem: an already allocated block of memory The variable holding the libxml free() implementation</p> 144*7c568831SAndroid Build Coastguard Worker</div> 145*7c568831SAndroid Build Coastguard Worker<hr> 146*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 147*7c568831SAndroid Build Coastguard Worker<h3> 148*7c568831SAndroid Build Coastguard Worker<a name="xmlMalloc">Variable </a>xmlMalloc</h3> 149*7c568831SAndroid Build Coastguard Worker<pre class="programlisting"><a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> xmlMalloc; 150*7c568831SAndroid Build Coastguard Worker</pre> 151*7c568831SAndroid Build Coastguard Worker<p>@size: the size requested in bytes The variable holding the libxml malloc() implementation Returns a pointer to the newly allocated block or NULL in case of error</p> 152*7c568831SAndroid Build Coastguard Worker</div> 153*7c568831SAndroid Build Coastguard Worker<hr> 154*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 155*7c568831SAndroid Build Coastguard Worker<h3> 156*7c568831SAndroid Build Coastguard Worker<a name="xmlMallocAtomic">Variable </a>xmlMallocAtomic</h3> 157*7c568831SAndroid Build Coastguard Worker<pre class="programlisting"><a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> xmlMallocAtomic; 158*7c568831SAndroid Build Coastguard Worker</pre> 159*7c568831SAndroid Build Coastguard Worker<p>@size: the size requested in bytes The variable holding the libxml malloc() implementation for atomic data (i.e. blocks not containing pointers), useful when using a garbage collecting allocator. Returns a pointer to the newly allocated block or NULL in case of error</p> 160*7c568831SAndroid Build Coastguard Worker</div> 161*7c568831SAndroid Build Coastguard Worker<hr> 162*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 163*7c568831SAndroid Build Coastguard Worker<h3> 164*7c568831SAndroid Build Coastguard Worker<a name="xmlMemStrdup">Variable </a>xmlMemStrdup</h3> 165*7c568831SAndroid Build Coastguard Worker<pre class="programlisting"><a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> xmlMemStrdup; 166*7c568831SAndroid Build Coastguard Worker</pre> 167*7c568831SAndroid Build Coastguard Worker<p>@str: a zero terminated string The variable holding the libxml strdup() implementation Returns the copy of the string or NULL in case of error</p> 168*7c568831SAndroid Build Coastguard Worker</div> 169*7c568831SAndroid Build Coastguard Worker<hr> 170*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 171*7c568831SAndroid Build Coastguard Worker<h3> 172*7c568831SAndroid Build Coastguard Worker<a name="xmlRealloc">Variable </a>xmlRealloc</h3> 173*7c568831SAndroid Build Coastguard Worker<pre class="programlisting"><a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> xmlRealloc; 174*7c568831SAndroid Build Coastguard Worker</pre> 175*7c568831SAndroid Build Coastguard Worker<p>@mem: an already allocated block of memory @size: the new size requested in bytes The variable holding the libxml realloc() implementation Returns a pointer to the newly reallocated block or NULL in case of error</p> 176*7c568831SAndroid Build Coastguard Worker</div> 177*7c568831SAndroid Build Coastguard Worker<hr> 178*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 179*7c568831SAndroid Build Coastguard Worker<h3> 180*7c568831SAndroid Build Coastguard Worker<a name="xmlCleanupMemory"></a>xmlCleanupMemory ()</h3> 181*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void xmlCleanupMemory (void)<br> 182*7c568831SAndroid Build Coastguard Worker</pre> 183*7c568831SAndroid Build Coastguard Worker<p>DEPRECATED: This function is a no-op. Call <a href="libxml2-parser.html#xmlCleanupParser">xmlCleanupParser</a> to free global state but see the warnings there. <a href="libxml2-parser.html#xmlCleanupParser">xmlCleanupParser</a> should be only called once at program exit. In most cases, you don't have call cleanup functions at all.</p> 184*7c568831SAndroid Build Coastguard Worker</div> 185*7c568831SAndroid Build Coastguard Worker<hr> 186*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 187*7c568831SAndroid Build Coastguard Worker<h3> 188*7c568831SAndroid Build Coastguard Worker<a name="xmlGcMemGet"></a>xmlGcMemGet ()</h3> 189*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlGcMemGet (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> * freeFunc, <br> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocAtomicFunc, <br> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> * reallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> * strdupFunc)<br> 190*7c568831SAndroid Build Coastguard Worker</pre> 191*7c568831SAndroid Build Coastguard Worker<p>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</p> 192*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 193*7c568831SAndroid Build Coastguard Worker<col align="left"> 194*7c568831SAndroid Build Coastguard Worker<tbody> 195*7c568831SAndroid Build Coastguard Worker<tr> 196*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>freeFunc</tt></i>:</span></td> 197*7c568831SAndroid Build Coastguard Worker<td>place to save the free() function in use</td> 198*7c568831SAndroid Build Coastguard Worker</tr> 199*7c568831SAndroid Build Coastguard Worker<tr> 200*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>mallocFunc</tt></i>:</span></td> 201*7c568831SAndroid Build Coastguard Worker<td>place to save the malloc() function in use</td> 202*7c568831SAndroid Build Coastguard Worker</tr> 203*7c568831SAndroid Build Coastguard Worker<tr> 204*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>mallocAtomicFunc</tt></i>:</span></td> 205*7c568831SAndroid Build Coastguard Worker<td>place to save the atomic malloc() function in use</td> 206*7c568831SAndroid Build Coastguard Worker</tr> 207*7c568831SAndroid Build Coastguard Worker<tr> 208*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>reallocFunc</tt></i>:</span></td> 209*7c568831SAndroid Build Coastguard Worker<td>place to save the realloc() function in use</td> 210*7c568831SAndroid Build Coastguard Worker</tr> 211*7c568831SAndroid Build Coastguard Worker<tr> 212*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>strdupFunc</tt></i>:</span></td> 213*7c568831SAndroid Build Coastguard Worker<td>place to save the strdup() function in use</td> 214*7c568831SAndroid Build Coastguard Worker</tr> 215*7c568831SAndroid Build Coastguard Worker<tr> 216*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 217*7c568831SAndroid Build Coastguard Worker<td>0 on success</td> 218*7c568831SAndroid Build Coastguard Worker</tr> 219*7c568831SAndroid Build Coastguard Worker</tbody> 220*7c568831SAndroid Build Coastguard Worker</table></div> 221*7c568831SAndroid Build Coastguard Worker</div> 222*7c568831SAndroid Build Coastguard Worker<hr> 223*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 224*7c568831SAndroid Build Coastguard Worker<h3> 225*7c568831SAndroid Build Coastguard Worker<a name="xmlGcMemSetup"></a>xmlGcMemSetup ()</h3> 226*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlGcMemSetup (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc, <br> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocAtomicFunc, <br> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc)<br> 227*7c568831SAndroid Build Coastguard Worker</pre> 228*7c568831SAndroid Build Coastguard Worker<p>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 ?</p> 229*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 230*7c568831SAndroid Build Coastguard Worker<col align="left"> 231*7c568831SAndroid Build Coastguard Worker<tbody> 232*7c568831SAndroid Build Coastguard Worker<tr> 233*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>freeFunc</tt></i>:</span></td> 234*7c568831SAndroid Build Coastguard Worker<td>the free() function to use</td> 235*7c568831SAndroid Build Coastguard Worker</tr> 236*7c568831SAndroid Build Coastguard Worker<tr> 237*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>mallocFunc</tt></i>:</span></td> 238*7c568831SAndroid Build Coastguard Worker<td>the malloc() function to use</td> 239*7c568831SAndroid Build Coastguard Worker</tr> 240*7c568831SAndroid Build Coastguard Worker<tr> 241*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>mallocAtomicFunc</tt></i>:</span></td> 242*7c568831SAndroid Build Coastguard Worker<td>the malloc() function to use for atomic allocations</td> 243*7c568831SAndroid Build Coastguard Worker</tr> 244*7c568831SAndroid Build Coastguard Worker<tr> 245*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>reallocFunc</tt></i>:</span></td> 246*7c568831SAndroid Build Coastguard Worker<td>the realloc() function to use</td> 247*7c568831SAndroid Build Coastguard Worker</tr> 248*7c568831SAndroid Build Coastguard Worker<tr> 249*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>strdupFunc</tt></i>:</span></td> 250*7c568831SAndroid Build Coastguard Worker<td>the strdup() function to use</td> 251*7c568831SAndroid Build Coastguard Worker</tr> 252*7c568831SAndroid Build Coastguard Worker<tr> 253*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 254*7c568831SAndroid Build Coastguard Worker<td>0 on success</td> 255*7c568831SAndroid Build Coastguard Worker</tr> 256*7c568831SAndroid Build Coastguard Worker</tbody> 257*7c568831SAndroid Build Coastguard Worker</table></div> 258*7c568831SAndroid Build Coastguard Worker</div> 259*7c568831SAndroid Build Coastguard Worker<hr> 260*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 261*7c568831SAndroid Build Coastguard Worker<h3> 262*7c568831SAndroid Build Coastguard Worker<a name="xmlInitMemory"></a>xmlInitMemory ()</h3> 263*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlInitMemory (void)<br> 264*7c568831SAndroid Build Coastguard Worker</pre> 265*7c568831SAndroid Build Coastguard Worker<p>DEPRECATED: Alias for <a href="libxml2-parser.html#xmlInitParser">xmlInitParser</a>.</p> 266*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 267*7c568831SAndroid Build Coastguard Worker<col align="left"> 268*7c568831SAndroid Build Coastguard Worker<tbody><tr> 269*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 270*7c568831SAndroid Build Coastguard Worker<td>0.</td> 271*7c568831SAndroid Build Coastguard Worker</tr></tbody> 272*7c568831SAndroid Build Coastguard Worker</table></div> 273*7c568831SAndroid Build Coastguard Worker</div> 274*7c568831SAndroid Build Coastguard Worker<hr> 275*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 276*7c568831SAndroid Build Coastguard Worker<h3> 277*7c568831SAndroid Build Coastguard Worker<a name="xmlMallocAtomicLoc"></a>xmlMallocAtomicLoc ()</h3> 278*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void * xmlMallocAtomicLoc (size_t size, <br> const char * file, <br> int line)<br> 279*7c568831SAndroid Build Coastguard Worker</pre> 280*7c568831SAndroid Build Coastguard Worker<p>DEPRECATED: don't use</p> 281*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 282*7c568831SAndroid Build Coastguard Worker<col align="left"> 283*7c568831SAndroid Build Coastguard Worker<tbody> 284*7c568831SAndroid Build Coastguard Worker<tr> 285*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>size</tt></i>:</span></td> 286*7c568831SAndroid Build Coastguard Worker<td>an unsigned int specifying the size in byte to allocate.</td> 287*7c568831SAndroid Build Coastguard Worker</tr> 288*7c568831SAndroid Build Coastguard Worker<tr> 289*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>file</tt></i>:</span></td> 290*7c568831SAndroid Build Coastguard Worker<td>the file name or NULL</td> 291*7c568831SAndroid Build Coastguard Worker</tr> 292*7c568831SAndroid Build Coastguard Worker<tr> 293*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>line</tt></i>:</span></td> 294*7c568831SAndroid Build Coastguard Worker<td>the line number</td> 295*7c568831SAndroid Build Coastguard Worker</tr> 296*7c568831SAndroid Build Coastguard Worker<tr> 297*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 298*7c568831SAndroid Build Coastguard Worker<td>a pointer to the allocated area or NULL in case of lack of memory.</td> 299*7c568831SAndroid Build Coastguard Worker</tr> 300*7c568831SAndroid Build Coastguard Worker</tbody> 301*7c568831SAndroid Build Coastguard Worker</table></div> 302*7c568831SAndroid Build Coastguard Worker</div> 303*7c568831SAndroid Build Coastguard Worker<hr> 304*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 305*7c568831SAndroid Build Coastguard Worker<h3> 306*7c568831SAndroid Build Coastguard Worker<a name="xmlMallocLoc"></a>xmlMallocLoc ()</h3> 307*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void * xmlMallocLoc (size_t size, <br> const char * file, <br> int line)<br> 308*7c568831SAndroid Build Coastguard Worker</pre> 309*7c568831SAndroid Build Coastguard Worker<p>DEPRECATED: don't use</p> 310*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 311*7c568831SAndroid Build Coastguard Worker<col align="left"> 312*7c568831SAndroid Build Coastguard Worker<tbody> 313*7c568831SAndroid Build Coastguard Worker<tr> 314*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>size</tt></i>:</span></td> 315*7c568831SAndroid Build Coastguard Worker<td>an int specifying the size in byte to allocate.</td> 316*7c568831SAndroid Build Coastguard Worker</tr> 317*7c568831SAndroid Build Coastguard Worker<tr> 318*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>file</tt></i>:</span></td> 319*7c568831SAndroid Build Coastguard Worker<td>the file name or NULL</td> 320*7c568831SAndroid Build Coastguard Worker</tr> 321*7c568831SAndroid Build Coastguard Worker<tr> 322*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>line</tt></i>:</span></td> 323*7c568831SAndroid Build Coastguard Worker<td>the line number</td> 324*7c568831SAndroid Build Coastguard Worker</tr> 325*7c568831SAndroid Build Coastguard Worker<tr> 326*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 327*7c568831SAndroid Build Coastguard Worker<td>a pointer to the allocated area or NULL in case of lack of memory.</td> 328*7c568831SAndroid Build Coastguard Worker</tr> 329*7c568831SAndroid Build Coastguard Worker</tbody> 330*7c568831SAndroid Build Coastguard Worker</table></div> 331*7c568831SAndroid Build Coastguard Worker</div> 332*7c568831SAndroid Build Coastguard Worker<hr> 333*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 334*7c568831SAndroid Build Coastguard Worker<h3> 335*7c568831SAndroid Build Coastguard Worker<a name="xmlMemBlocks"></a>xmlMemBlocks ()</h3> 336*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlMemBlocks (void)<br> 337*7c568831SAndroid Build Coastguard Worker</pre> 338*7c568831SAndroid Build Coastguard Worker<p>Provides the number of memory areas currently allocated</p> 339*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 340*7c568831SAndroid Build Coastguard Worker<col align="left"> 341*7c568831SAndroid Build Coastguard Worker<tbody><tr> 342*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 343*7c568831SAndroid Build Coastguard Worker<td>an int representing the number of blocks</td> 344*7c568831SAndroid Build Coastguard Worker</tr></tbody> 345*7c568831SAndroid Build Coastguard Worker</table></div> 346*7c568831SAndroid Build Coastguard Worker</div> 347*7c568831SAndroid Build Coastguard Worker<hr> 348*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 349*7c568831SAndroid Build Coastguard Worker<h3> 350*7c568831SAndroid Build Coastguard Worker<a name="xmlMemDisplay"></a>xmlMemDisplay ()</h3> 351*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void xmlMemDisplay (FILE * fp)<br> 352*7c568831SAndroid Build Coastguard Worker</pre> 353*7c568831SAndroid Build Coastguard Worker<p>DEPRECATED: This feature was removed.</p> 354*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 355*7c568831SAndroid Build Coastguard Worker<col align="left"> 356*7c568831SAndroid Build Coastguard Worker<tbody><tr> 357*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>fp</tt></i>:</span></td> 358*7c568831SAndroid Build Coastguard Worker<td>a FILE descriptor</td> 359*7c568831SAndroid Build Coastguard Worker</tr></tbody> 360*7c568831SAndroid Build Coastguard Worker</table></div> 361*7c568831SAndroid Build Coastguard Worker</div> 362*7c568831SAndroid Build Coastguard Worker<hr> 363*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 364*7c568831SAndroid Build Coastguard Worker<h3> 365*7c568831SAndroid Build Coastguard Worker<a name="xmlMemDisplayLast"></a>xmlMemDisplayLast ()</h3> 366*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void xmlMemDisplayLast (FILE * fp, <br> long nbBytes)<br> 367*7c568831SAndroid Build Coastguard Worker</pre> 368*7c568831SAndroid Build Coastguard Worker<p>DEPRECATED: This feature was removed.</p> 369*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 370*7c568831SAndroid Build Coastguard Worker<col align="left"> 371*7c568831SAndroid Build Coastguard Worker<tbody> 372*7c568831SAndroid Build Coastguard Worker<tr> 373*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>fp</tt></i>:</span></td> 374*7c568831SAndroid Build Coastguard Worker<td>a FILE descriptor</td> 375*7c568831SAndroid Build Coastguard Worker</tr> 376*7c568831SAndroid Build Coastguard Worker<tr> 377*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>nbBytes</tt></i>:</span></td> 378*7c568831SAndroid Build Coastguard Worker<td>the amount of memory to dump</td> 379*7c568831SAndroid Build Coastguard Worker</tr> 380*7c568831SAndroid Build Coastguard Worker</tbody> 381*7c568831SAndroid Build Coastguard Worker</table></div> 382*7c568831SAndroid Build Coastguard Worker</div> 383*7c568831SAndroid Build Coastguard Worker<hr> 384*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 385*7c568831SAndroid Build Coastguard Worker<h3> 386*7c568831SAndroid Build Coastguard Worker<a name="xmlMemFree"></a>xmlMemFree ()</h3> 387*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void xmlMemFree (void * ptr)<br> 388*7c568831SAndroid Build Coastguard Worker</pre> 389*7c568831SAndroid Build Coastguard Worker<p>a free() equivalent, with error checking.</p> 390*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 391*7c568831SAndroid Build Coastguard Worker<col align="left"> 392*7c568831SAndroid Build Coastguard Worker<tbody><tr> 393*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ptr</tt></i>:</span></td> 394*7c568831SAndroid Build Coastguard Worker<td>the memory block pointer</td> 395*7c568831SAndroid Build Coastguard Worker</tr></tbody> 396*7c568831SAndroid Build Coastguard Worker</table></div> 397*7c568831SAndroid Build Coastguard Worker</div> 398*7c568831SAndroid Build Coastguard Worker<hr> 399*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 400*7c568831SAndroid Build Coastguard Worker<h3> 401*7c568831SAndroid Build Coastguard Worker<a name="xmlMemGet"></a>xmlMemGet ()</h3> 402*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlMemGet (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> * freeFunc, <br> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> * reallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> * strdupFunc)<br> 403*7c568831SAndroid Build Coastguard Worker</pre> 404*7c568831SAndroid Build Coastguard Worker<p>Provides the memory access functions set currently in use</p> 405*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 406*7c568831SAndroid Build Coastguard Worker<col align="left"> 407*7c568831SAndroid Build Coastguard Worker<tbody> 408*7c568831SAndroid Build Coastguard Worker<tr> 409*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>freeFunc</tt></i>:</span></td> 410*7c568831SAndroid Build Coastguard Worker<td>place to save the free() function in use</td> 411*7c568831SAndroid Build Coastguard Worker</tr> 412*7c568831SAndroid Build Coastguard Worker<tr> 413*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>mallocFunc</tt></i>:</span></td> 414*7c568831SAndroid Build Coastguard Worker<td>place to save the malloc() function in use</td> 415*7c568831SAndroid Build Coastguard Worker</tr> 416*7c568831SAndroid Build Coastguard Worker<tr> 417*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>reallocFunc</tt></i>:</span></td> 418*7c568831SAndroid Build Coastguard Worker<td>place to save the realloc() function in use</td> 419*7c568831SAndroid Build Coastguard Worker</tr> 420*7c568831SAndroid Build Coastguard Worker<tr> 421*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>strdupFunc</tt></i>:</span></td> 422*7c568831SAndroid Build Coastguard Worker<td>place to save the strdup() function in use</td> 423*7c568831SAndroid Build Coastguard Worker</tr> 424*7c568831SAndroid Build Coastguard Worker<tr> 425*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 426*7c568831SAndroid Build Coastguard Worker<td>0 on success</td> 427*7c568831SAndroid Build Coastguard Worker</tr> 428*7c568831SAndroid Build Coastguard Worker</tbody> 429*7c568831SAndroid Build Coastguard Worker</table></div> 430*7c568831SAndroid Build Coastguard Worker</div> 431*7c568831SAndroid Build Coastguard Worker<hr> 432*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 433*7c568831SAndroid Build Coastguard Worker<h3> 434*7c568831SAndroid Build Coastguard Worker<a name="xmlMemMalloc"></a>xmlMemMalloc ()</h3> 435*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void * xmlMemMalloc (size_t size)<br> 436*7c568831SAndroid Build Coastguard Worker</pre> 437*7c568831SAndroid Build Coastguard Worker<p>a malloc() equivalent, with logging of the allocation info.</p> 438*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 439*7c568831SAndroid Build Coastguard Worker<col align="left"> 440*7c568831SAndroid Build Coastguard Worker<tbody> 441*7c568831SAndroid Build Coastguard Worker<tr> 442*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>size</tt></i>:</span></td> 443*7c568831SAndroid Build Coastguard Worker<td>an int specifying the size in byte to allocate.</td> 444*7c568831SAndroid Build Coastguard Worker</tr> 445*7c568831SAndroid Build Coastguard Worker<tr> 446*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 447*7c568831SAndroid Build Coastguard Worker<td>a pointer to the allocated area or NULL in case of lack of memory.</td> 448*7c568831SAndroid Build Coastguard Worker</tr> 449*7c568831SAndroid Build Coastguard Worker</tbody> 450*7c568831SAndroid Build Coastguard Worker</table></div> 451*7c568831SAndroid Build Coastguard Worker</div> 452*7c568831SAndroid Build Coastguard Worker<hr> 453*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 454*7c568831SAndroid Build Coastguard Worker<h3> 455*7c568831SAndroid Build Coastguard Worker<a name="xmlMemRealloc"></a>xmlMemRealloc ()</h3> 456*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void * xmlMemRealloc (void * ptr, <br> size_t size)<br> 457*7c568831SAndroid Build Coastguard Worker</pre> 458*7c568831SAndroid Build Coastguard Worker<p>a realloc() equivalent, with logging of the allocation info.</p> 459*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 460*7c568831SAndroid Build Coastguard Worker<col align="left"> 461*7c568831SAndroid Build Coastguard Worker<tbody> 462*7c568831SAndroid Build Coastguard Worker<tr> 463*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ptr</tt></i>:</span></td> 464*7c568831SAndroid Build Coastguard Worker<td>the initial memory block pointer</td> 465*7c568831SAndroid Build Coastguard Worker</tr> 466*7c568831SAndroid Build Coastguard Worker<tr> 467*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>size</tt></i>:</span></td> 468*7c568831SAndroid Build Coastguard Worker<td>an int specifying the size in byte to allocate.</td> 469*7c568831SAndroid Build Coastguard Worker</tr> 470*7c568831SAndroid Build Coastguard Worker<tr> 471*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 472*7c568831SAndroid Build Coastguard Worker<td>a pointer to the allocated area or NULL in case of lack of memory.</td> 473*7c568831SAndroid Build Coastguard Worker</tr> 474*7c568831SAndroid Build Coastguard Worker</tbody> 475*7c568831SAndroid Build Coastguard Worker</table></div> 476*7c568831SAndroid Build Coastguard Worker</div> 477*7c568831SAndroid Build Coastguard Worker<hr> 478*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 479*7c568831SAndroid Build Coastguard Worker<h3> 480*7c568831SAndroid Build Coastguard Worker<a name="xmlMemSetup"></a>xmlMemSetup ()</h3> 481*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlMemSetup (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc, <br> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc, <br> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc)<br> 482*7c568831SAndroid Build Coastguard Worker</pre> 483*7c568831SAndroid Build Coastguard Worker<p>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 ?</p> 484*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 485*7c568831SAndroid Build Coastguard Worker<col align="left"> 486*7c568831SAndroid Build Coastguard Worker<tbody> 487*7c568831SAndroid Build Coastguard Worker<tr> 488*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>freeFunc</tt></i>:</span></td> 489*7c568831SAndroid Build Coastguard Worker<td>the free() function to use</td> 490*7c568831SAndroid Build Coastguard Worker</tr> 491*7c568831SAndroid Build Coastguard Worker<tr> 492*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>mallocFunc</tt></i>:</span></td> 493*7c568831SAndroid Build Coastguard Worker<td>the malloc() function to use</td> 494*7c568831SAndroid Build Coastguard Worker</tr> 495*7c568831SAndroid Build Coastguard Worker<tr> 496*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>reallocFunc</tt></i>:</span></td> 497*7c568831SAndroid Build Coastguard Worker<td>the realloc() function to use</td> 498*7c568831SAndroid Build Coastguard Worker</tr> 499*7c568831SAndroid Build Coastguard Worker<tr> 500*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>strdupFunc</tt></i>:</span></td> 501*7c568831SAndroid Build Coastguard Worker<td>the strdup() function to use</td> 502*7c568831SAndroid Build Coastguard Worker</tr> 503*7c568831SAndroid Build Coastguard Worker<tr> 504*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 505*7c568831SAndroid Build Coastguard Worker<td>0 on success</td> 506*7c568831SAndroid Build Coastguard Worker</tr> 507*7c568831SAndroid Build Coastguard Worker</tbody> 508*7c568831SAndroid Build Coastguard Worker</table></div> 509*7c568831SAndroid Build Coastguard Worker</div> 510*7c568831SAndroid Build Coastguard Worker<hr> 511*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 512*7c568831SAndroid Build Coastguard Worker<h3> 513*7c568831SAndroid Build Coastguard Worker<a name="xmlMemShow"></a>xmlMemShow ()</h3> 514*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void xmlMemShow (FILE * fp, <br> int nr)<br> 515*7c568831SAndroid Build Coastguard Worker</pre> 516*7c568831SAndroid Build Coastguard Worker<p>DEPRECATED: This feature was removed.</p> 517*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 518*7c568831SAndroid Build Coastguard Worker<col align="left"> 519*7c568831SAndroid Build Coastguard Worker<tbody> 520*7c568831SAndroid Build Coastguard Worker<tr> 521*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>fp</tt></i>:</span></td> 522*7c568831SAndroid Build Coastguard Worker<td>a FILE descriptor</td> 523*7c568831SAndroid Build Coastguard Worker</tr> 524*7c568831SAndroid Build Coastguard Worker<tr> 525*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>nr</tt></i>:</span></td> 526*7c568831SAndroid Build Coastguard Worker<td>number of entries to dump</td> 527*7c568831SAndroid Build Coastguard Worker</tr> 528*7c568831SAndroid Build Coastguard Worker</tbody> 529*7c568831SAndroid Build Coastguard Worker</table></div> 530*7c568831SAndroid Build Coastguard Worker</div> 531*7c568831SAndroid Build Coastguard Worker<hr> 532*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 533*7c568831SAndroid Build Coastguard Worker<h3> 534*7c568831SAndroid Build Coastguard Worker<a name="xmlMemSize"></a>xmlMemSize ()</h3> 535*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">size_t xmlMemSize (void * ptr)<br> 536*7c568831SAndroid Build Coastguard Worker</pre> 537*7c568831SAndroid Build Coastguard Worker<p></p> 538*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 539*7c568831SAndroid Build Coastguard Worker<col align="left"> 540*7c568831SAndroid Build Coastguard Worker<tbody> 541*7c568831SAndroid Build Coastguard Worker<tr> 542*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ptr</tt></i>:</span></td> 543*7c568831SAndroid Build Coastguard Worker<td>pointer to the memory allocation</td> 544*7c568831SAndroid Build Coastguard Worker</tr> 545*7c568831SAndroid Build Coastguard Worker<tr> 546*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 547*7c568831SAndroid Build Coastguard Worker<td>the size of a memory allocation.</td> 548*7c568831SAndroid Build Coastguard Worker</tr> 549*7c568831SAndroid Build Coastguard Worker</tbody> 550*7c568831SAndroid Build Coastguard Worker</table></div> 551*7c568831SAndroid Build Coastguard Worker</div> 552*7c568831SAndroid Build Coastguard Worker<hr> 553*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 554*7c568831SAndroid Build Coastguard Worker<h3> 555*7c568831SAndroid Build Coastguard Worker<a name="xmlMemStrdupLoc"></a>xmlMemStrdupLoc ()</h3> 556*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">char * xmlMemStrdupLoc (const char * str, <br> const char * file, <br> int line)<br> 557*7c568831SAndroid Build Coastguard Worker</pre> 558*7c568831SAndroid Build Coastguard Worker<p>DEPRECATED: don't use</p> 559*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 560*7c568831SAndroid Build Coastguard Worker<col align="left"> 561*7c568831SAndroid Build Coastguard Worker<tbody> 562*7c568831SAndroid Build Coastguard Worker<tr> 563*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>str</tt></i>:</span></td> 564*7c568831SAndroid Build Coastguard Worker<td>the initial string pointer</td> 565*7c568831SAndroid Build Coastguard Worker</tr> 566*7c568831SAndroid Build Coastguard Worker<tr> 567*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>file</tt></i>:</span></td> 568*7c568831SAndroid Build Coastguard Worker<td>the file name or NULL</td> 569*7c568831SAndroid Build Coastguard Worker</tr> 570*7c568831SAndroid Build Coastguard Worker<tr> 571*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>line</tt></i>:</span></td> 572*7c568831SAndroid Build Coastguard Worker<td>the line number</td> 573*7c568831SAndroid Build Coastguard Worker</tr> 574*7c568831SAndroid Build Coastguard Worker<tr> 575*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 576*7c568831SAndroid Build Coastguard Worker<td>a pointer to the new string or NULL if allocation error occurred.</td> 577*7c568831SAndroid Build Coastguard Worker</tr> 578*7c568831SAndroid Build Coastguard Worker</tbody> 579*7c568831SAndroid Build Coastguard Worker</table></div> 580*7c568831SAndroid Build Coastguard Worker</div> 581*7c568831SAndroid Build Coastguard Worker<hr> 582*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 583*7c568831SAndroid Build Coastguard Worker<h3> 584*7c568831SAndroid Build Coastguard Worker<a name="xmlMemUsed"></a>xmlMemUsed ()</h3> 585*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlMemUsed (void)<br> 586*7c568831SAndroid Build Coastguard Worker</pre> 587*7c568831SAndroid Build Coastguard Worker<p>Provides the amount of memory currently allocated</p> 588*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 589*7c568831SAndroid Build Coastguard Worker<col align="left"> 590*7c568831SAndroid Build Coastguard Worker<tbody><tr> 591*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 592*7c568831SAndroid Build Coastguard Worker<td>an int representing the amount of memory allocated.</td> 593*7c568831SAndroid Build Coastguard Worker</tr></tbody> 594*7c568831SAndroid Build Coastguard Worker</table></div> 595*7c568831SAndroid Build Coastguard Worker</div> 596*7c568831SAndroid Build Coastguard Worker<hr> 597*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 598*7c568831SAndroid Build Coastguard Worker<h3> 599*7c568831SAndroid Build Coastguard Worker<a name="xmlMemoryDump"></a>xmlMemoryDump ()</h3> 600*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void xmlMemoryDump (void)<br> 601*7c568831SAndroid Build Coastguard Worker</pre> 602*7c568831SAndroid Build Coastguard Worker<p>DEPRECATED: This feature was removed.</p> 603*7c568831SAndroid Build Coastguard Worker</div> 604*7c568831SAndroid Build Coastguard Worker<hr> 605*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 606*7c568831SAndroid Build Coastguard Worker<h3> 607*7c568831SAndroid Build Coastguard Worker<a name="xmlMemoryStrdup"></a>xmlMemoryStrdup ()</h3> 608*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">char * xmlMemoryStrdup (const char * str)<br> 609*7c568831SAndroid Build Coastguard Worker</pre> 610*7c568831SAndroid Build Coastguard Worker<p>a strdup() equivalent, with logging of the allocation info.</p> 611*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 612*7c568831SAndroid Build Coastguard Worker<col align="left"> 613*7c568831SAndroid Build Coastguard Worker<tbody> 614*7c568831SAndroid Build Coastguard Worker<tr> 615*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>str</tt></i>:</span></td> 616*7c568831SAndroid Build Coastguard Worker<td>the initial string pointer</td> 617*7c568831SAndroid Build Coastguard Worker</tr> 618*7c568831SAndroid Build Coastguard Worker<tr> 619*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 620*7c568831SAndroid Build Coastguard Worker<td>a pointer to the new string or NULL if allocation error occurred.</td> 621*7c568831SAndroid Build Coastguard Worker</tr> 622*7c568831SAndroid Build Coastguard Worker</tbody> 623*7c568831SAndroid Build Coastguard Worker</table></div> 624*7c568831SAndroid Build Coastguard Worker</div> 625*7c568831SAndroid Build Coastguard Worker<hr> 626*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 627*7c568831SAndroid Build Coastguard Worker<h3> 628*7c568831SAndroid Build Coastguard Worker<a name="xmlReallocLoc"></a>xmlReallocLoc ()</h3> 629*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void * xmlReallocLoc (void * ptr, <br> size_t size, <br> const char * file, <br> int line)<br> 630*7c568831SAndroid Build Coastguard Worker</pre> 631*7c568831SAndroid Build Coastguard Worker<p>DEPRECATED: don't use</p> 632*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 633*7c568831SAndroid Build Coastguard Worker<col align="left"> 634*7c568831SAndroid Build Coastguard Worker<tbody> 635*7c568831SAndroid Build Coastguard Worker<tr> 636*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ptr</tt></i>:</span></td> 637*7c568831SAndroid Build Coastguard Worker<td>the initial memory block pointer</td> 638*7c568831SAndroid Build Coastguard Worker</tr> 639*7c568831SAndroid Build Coastguard Worker<tr> 640*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>size</tt></i>:</span></td> 641*7c568831SAndroid Build Coastguard Worker<td>an int specifying the size in byte to allocate.</td> 642*7c568831SAndroid Build Coastguard Worker</tr> 643*7c568831SAndroid Build Coastguard Worker<tr> 644*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>file</tt></i>:</span></td> 645*7c568831SAndroid Build Coastguard Worker<td>the file name or NULL</td> 646*7c568831SAndroid Build Coastguard Worker</tr> 647*7c568831SAndroid Build Coastguard Worker<tr> 648*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>line</tt></i>:</span></td> 649*7c568831SAndroid Build Coastguard Worker<td>the line number</td> 650*7c568831SAndroid Build Coastguard Worker</tr> 651*7c568831SAndroid Build Coastguard Worker<tr> 652*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 653*7c568831SAndroid Build Coastguard Worker<td>a pointer to the allocated area or NULL in case of lack of memory.</td> 654*7c568831SAndroid Build Coastguard Worker</tr> 655*7c568831SAndroid Build Coastguard Worker</tbody> 656*7c568831SAndroid Build Coastguard Worker</table></div> 657*7c568831SAndroid Build Coastguard Worker</div> 658*7c568831SAndroid Build Coastguard Worker<hr> 659*7c568831SAndroid Build Coastguard Worker</div> 660*7c568831SAndroid Build Coastguard Worker</div> 661*7c568831SAndroid Build Coastguard Worker</body> 662*7c568831SAndroid Build Coastguard Worker</html> 663