blob: cd2f7ba25e725be98d72f2eea3a85acab0ca85cc [file] [log] [blame]
Daniel Veillardd4330462003-04-29 12:40:16 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xmlmemory</title><meta name="generator" content="DocBook XSL Stylesheets V1.58.1"><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css">
3 .synopsis, .classsynopsis {
4 background: #eeeeee;
5 border: solid 1px #aaaaaa;
6 padding: 0.5em;
7 }
8 .programlisting {
9 background: #eeeeff;
10 border: solid 1px #aaaaff;
11 padding: 0.5em;
12 }
13 .variablelist {
14 padding: 4px;
15 margin-left: 3em;
16 }
17 .navigation {
18 background: #ffeeee;
19 border: solid 1px #ffaaaa;
20 margin-top: 0.5em;
21 margin-bottom: 0.5em;
22 }
23 .navigation a {
24 color: #770000;
25 }
26 .navigation a:visited {
27 color: #550000;
28 }
29 .navigation .title {
30 font-size: 200%;
31 }
32 </style><link rel="home" href="index.html" title="Gnome XML Library Reference Manual"><link rel="up" href="libxml-lib.html" title="Libxml Library Reference"><link rel="previous" href="libxml-debugXML.html" title="debugXML"><link rel="next" href="libxml-xmlregexp.html" title="xmlregexp"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-debugXML.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td><td><a accesskey="u" href="libxml-lib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td><th width="100%" align="center">Gnome XML Library Reference Manual</th><td><a accesskey="n" href="libxml-xmlregexp.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td></tr></table><div class="refentry" lang="en"><a name="libxml-xmlmemory"></a><div class="titlepage"></div><div class="refnamediv"><h2>xmlmemory</h2><p>xmlmemory &#8212; </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
Daniel Veillard7c1206f1999-10-14 09:10:25 +000033
Daniel Veillardd4330462003-04-29 12:40:16 +000034
35
36#define <a href="libxml-xmlmemory.html#DEBUG-MEMORY-CAPS">DEBUG_MEMORY</a>
37void (<a href="libxml-xmlmemory.html#xmlFreeFunc">*xmlFreeFunc</a>) (void *mem);
38void* (<a href="libxml-xmlmemory.html#xmlMallocFunc">*xmlMallocFunc</a>) (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="size-t">size_t</GTKDOCLINK> size);
39void* (<a href="libxml-xmlmemory.html#xmlReallocFunc">*xmlReallocFunc</a>) (void *mem,
40 <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="size-t">size_t</GTKDOCLINK> size);
41char* (<a href="libxml-xmlmemory.html#xmlStrdupFunc">*xmlStrdupFunc</a>) (const char *str);
42int <a href="libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a> (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc,
43 <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc,
44 <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc,
45 <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc);
46int <a href="libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a> (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> *freeFunc,
47 <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> *mallocFunc,
48 <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> *reallocFunc,
49 <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> *strdupFunc);
50int <a href="libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a> (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc,
51 <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc,
52 <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocAtomicFunc,
53 <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc,
54 <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc);
55int <a href="libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a> (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> *freeFunc,
56 <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> *mallocFunc,
57 <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> *mallocAtomicFunc,
58 <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> *reallocFunc,
59 <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> *strdupFunc);
60int <a href="libxml-xmlmemory.html#xmlInitMemory">xmlInitMemory</a> (void);
61int <a href="libxml-xmlmemory.html#xmlMemUsed">xmlMemUsed</a> (void);
62void <a href="libxml-xmlmemory.html#xmlMemDisplay">xmlMemDisplay</a> (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *fp);
63void <a href="libxml-xmlmemory.html#xmlMemShow">xmlMemShow</a> (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *fp,
Daniel Veillardf3a73582000-01-05 14:58:39 +000064 int nr);
Daniel Veillardd4330462003-04-29 12:40:16 +000065void <a href="libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> (void);
66void* <a href="libxml-xmlmemory.html#xmlMemMalloc">xmlMemMalloc</a> (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="size-t">size_t</GTKDOCLINK> size);
67void* <a href="libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a> (void *ptr,
68 <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="size-t">size_t</GTKDOCLINK> size);
69void <a href="libxml-xmlmemory.html#xmlMemFree">xmlMemFree</a> (void *ptr);
70char* <a href="libxml-xmlmemory.html#xmlMemoryStrdup">xmlMemoryStrdup</a> (const char *str);
71#define <a href="libxml-globals.html#xmlMalloc">xmlMalloc</a> (size)
72#define <a href="libxml-globals.html#xmlMallocAtomic">xmlMallocAtomic</a> (size)
73#define <a href="libxml-globals.html#xmlRealloc">xmlRealloc</a> (ptr, size)
74#define <a href="libxml-globals.html#xmlMemStrdup">xmlMemStrdup</a> (str)
75void* <a href="libxml-xmlmemory.html#xmlMallocLoc">xmlMallocLoc</a> (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="size-t">size_t</GTKDOCLINK> size,
Daniel Veillard7c1206f1999-10-14 09:10:25 +000076 const char *file,
77 int line);
Daniel Veillardd4330462003-04-29 12:40:16 +000078void* <a href="libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a> (void *ptr,
79 <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="size-t">size_t</GTKDOCLINK> size,
Daniel Veillard7c1206f1999-10-14 09:10:25 +000080 const char *file,
81 int line);
Daniel Veillardd4330462003-04-29 12:40:16 +000082char* <a href="libxml-xmlmemory.html#xmlMemStrdupLoc">xmlMemStrdupLoc</a> (const char *str,
Daniel Veillard7c1206f1999-10-14 09:10:25 +000083 const char *file,
Daniel Veillardd4330462003-04-29 12:40:16 +000084 int line);
85</pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
86
Daniel Veillard93d95252003-04-29 20:25:40 +000087</p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="DEBUG-MEMORY-CAPS"></a>DEBUG_MEMORY</h3><pre class="programlisting">#define DEBUG_MEMORY</pre><p>
Daniel Veillardd4330462003-04-29 12:40:16 +000088DEBUG_MEMORY replaces the allocator with a collect and debug
Daniel Veillard19274092002-03-25 16:48:03 +000089shell to the libc allocator.
90DEBUG_MEMORY should only be activated when debugging
Daniel Veillardd4330462003-04-29 12:40:16 +000091libxml i.e. if libxml has been configured with --with-debug-mem too.</p><p>
92
93</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFreeFunc"></a>xmlFreeFunc ()</h3><pre class="programlisting">void (*xmlFreeFunc) (void *mem);</pre><p>
94Signature for a <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="free">free</GTKDOCLINK>() implementation.</p><p>
95
Daniel Veillard93d95252003-04-29 20:25:40 +000096</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>mem</tt></i> :</span></td><td>
97
98
Daniel Veillardd4330462003-04-29 12:40:16 +000099</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMallocFunc"></a>xmlMallocFunc ()</h3><pre class="programlisting">void* (*xmlMallocFunc) (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="size-t">size_t</GTKDOCLINK> size);</pre><p>
100Signature for a <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="malloc">malloc</GTKDOCLINK>() implementation.</p><p>
101
Daniel Veillard93d95252003-04-29 20:25:40 +0000102</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>size</tt></i> :</span></td><td>
103
104
Daniel Veillardd4330462003-04-29 12:40:16 +0000105</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlReallocFunc"></a>xmlReallocFunc ()</h3><pre class="programlisting">void* (*xmlReallocFunc) (void *mem,
106 <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="size-t">size_t</GTKDOCLINK> size);</pre><p>
107Signature for a <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="realloc">realloc</GTKDOCLINK>() implementation.</p><p>
108
Daniel Veillard93d95252003-04-29 20:25:40 +0000109</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>mem</tt></i> :</span></td><td>
110</td></tr><tr><td><span class="term"><i><tt>size</tt></i> :</span></td><td>
111
112
Daniel Veillardd4330462003-04-29 12:40:16 +0000113</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStrdupFunc"></a>xmlStrdupFunc ()</h3><pre class="programlisting">char* (*xmlStrdupFunc) (const char *str);</pre><p>
114Signature for an <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="strdup">strdup</GTKDOCLINK>() implementation.</p><p>
115
Daniel Veillard93d95252003-04-29 20:25:40 +0000116</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str</tt></i> :</span></td><td>
117</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
118
119
Daniel Veillardd4330462003-04-29 12:40:16 +0000120</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMemSetup"></a>xmlMemSetup ()</h3><pre class="programlisting">int xmlMemSetup (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc,
121 <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc,
122 <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc,
123 <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc);</pre><p>
124Override the default memory access functions with a new set
125This has to be called before any other libxml routines !
126</p><p>
127Should this be blocked if there was already some allocations
128done ?</p><p>
129
Daniel Veillard93d95252003-04-29 20:25:40 +0000130</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>freeFunc</tt></i> :</span></td><td>
131</td></tr><tr><td><span class="term"><i><tt>mallocFunc</tt></i> :</span></td><td>
132</td></tr><tr><td><span class="term"><i><tt>reallocFunc</tt></i> :</span></td><td>
133</td></tr><tr><td><span class="term"><i><tt>strdupFunc</tt></i> :</span></td><td>
134</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
135
136
Daniel Veillardd4330462003-04-29 12:40:16 +0000137</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMemGet"></a>xmlMemGet ()</h3><pre class="programlisting">int xmlMemGet (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> *freeFunc,
138 <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> *mallocFunc,
139 <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> *reallocFunc,
140 <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> *strdupFunc);</pre><p>
141Provides the memory access functions set currently in use</p><p>
142
Daniel Veillard93d95252003-04-29 20:25:40 +0000143</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>freeFunc</tt></i> :</span></td><td>
144</td></tr><tr><td><span class="term"><i><tt>mallocFunc</tt></i> :</span></td><td>
145</td></tr><tr><td><span class="term"><i><tt>reallocFunc</tt></i> :</span></td><td>
146</td></tr><tr><td><span class="term"><i><tt>strdupFunc</tt></i> :</span></td><td>
147</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
148
149
Daniel Veillardd4330462003-04-29 12:40:16 +0000150</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGcMemSetup"></a>xmlGcMemSetup ()</h3><pre class="programlisting">int xmlGcMemSetup (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc,
151 <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc,
152 <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocAtomicFunc,
153 <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc,
154 <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc);</pre><p>
155Override the default memory access functions with a new set
156This has to be called before any other libxml routines !
157The mallocAtomicFunc is specialized for atomic block
158allocations (i.e. of areas useful for garbage collected memory allocators
159</p><p>
160Should this be blocked if there was already some allocations
161done ?</p><p>
162
Daniel Veillard93d95252003-04-29 20:25:40 +0000163</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>freeFunc</tt></i> :</span></td><td>
164</td></tr><tr><td><span class="term"><i><tt>mallocFunc</tt></i> :</span></td><td>
165</td></tr><tr><td><span class="term"><i><tt>mallocAtomicFunc</tt></i> :</span></td><td>
166</td></tr><tr><td><span class="term"><i><tt>reallocFunc</tt></i> :</span></td><td>
167</td></tr><tr><td><span class="term"><i><tt>strdupFunc</tt></i> :</span></td><td>
168</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
169
170
Daniel Veillardd4330462003-04-29 12:40:16 +0000171</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGcMemGet"></a>xmlGcMemGet ()</h3><pre class="programlisting">int xmlGcMemGet (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> *freeFunc,
172 <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> *mallocFunc,
173 <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> *mallocAtomicFunc,
174 <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> *reallocFunc,
175 <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> *strdupFunc);</pre><p>
176Provides the memory access functions set currently in use
177The mallocAtomicFunc is specialized for atomic block
178allocations (i.e. of areas useful for garbage collected memory allocators</p><p>
179
Daniel Veillard93d95252003-04-29 20:25:40 +0000180</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>freeFunc</tt></i> :</span></td><td>
181</td></tr><tr><td><span class="term"><i><tt>mallocFunc</tt></i> :</span></td><td>
182</td></tr><tr><td><span class="term"><i><tt>mallocAtomicFunc</tt></i> :</span></td><td>
183</td></tr><tr><td><span class="term"><i><tt>reallocFunc</tt></i> :</span></td><td>
184</td></tr><tr><td><span class="term"><i><tt>strdupFunc</tt></i> :</span></td><td>
185</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
186
187
Daniel Veillardd4330462003-04-29 12:40:16 +0000188</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlInitMemory"></a>xmlInitMemory ()</h3><pre class="programlisting">int xmlInitMemory (void);</pre><p>
189Initialize the memory layer.</p><p>
190
Daniel Veillard93d95252003-04-29 20:25:40 +0000191</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
192
193
Daniel Veillardd4330462003-04-29 12:40:16 +0000194</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMemUsed"></a>xmlMemUsed ()</h3><pre class="programlisting">int xmlMemUsed (void);</pre><p>
195Provides the amount of memory currently allocated</p><p>
196
Daniel Veillard93d95252003-04-29 20:25:40 +0000197</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
198
199
Daniel Veillardd4330462003-04-29 12:40:16 +0000200</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMemDisplay"></a>xmlMemDisplay ()</h3><pre class="programlisting">void xmlMemDisplay (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *fp);</pre><p>
201show in-extenso the memory blocks allocated</p><p>
202
Daniel Veillard93d95252003-04-29 20:25:40 +0000203</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>fp</tt></i> :</span></td><td>
204
205
Daniel Veillardd4330462003-04-29 12:40:16 +0000206</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMemShow"></a>xmlMemShow ()</h3><pre class="programlisting">void xmlMemShow (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *fp,
207 int nr);</pre><p>
208show a show display of the memory allocated, and dump
209the <i><tt>nr</tt></i> last allocated areas which were not freed</p><p>
210
Daniel Veillard93d95252003-04-29 20:25:40 +0000211</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>fp</tt></i> :</span></td><td>
212</td></tr><tr><td><span class="term"><i><tt>nr</tt></i> :</span></td><td>
213
214
Daniel Veillardd4330462003-04-29 12:40:16 +0000215</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMemoryDump"></a>xmlMemoryDump ()</h3><pre class="programlisting">void xmlMemoryDump (void);</pre><p>
216Dump in-extenso the memory blocks allocated to the file .memorylist</p><p>
217
218</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMemMalloc"></a>xmlMemMalloc ()</h3><pre class="programlisting">void* xmlMemMalloc (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="size-t">size_t</GTKDOCLINK> size);</pre><p>
219a <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="malloc">malloc</GTKDOCLINK>() equivalent, with logging of the allocation info.</p><p>
220
Daniel Veillard93d95252003-04-29 20:25:40 +0000221</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>size</tt></i> :</span></td><td>
222
223
Daniel Veillardd4330462003-04-29 12:40:16 +0000224</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMemRealloc"></a>xmlMemRealloc ()</h3><pre class="programlisting">void* xmlMemRealloc (void *ptr,
225 <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="size-t">size_t</GTKDOCLINK> size);</pre><p>
226a <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="realloc">realloc</GTKDOCLINK>() equivalent, with logging of the allocation info.</p><p>
227
Daniel Veillard93d95252003-04-29 20:25:40 +0000228</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ptr</tt></i> :</span></td><td>
229</td></tr><tr><td><span class="term"><i><tt>size</tt></i> :</span></td><td>
230
231
Daniel Veillardd4330462003-04-29 12:40:16 +0000232</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMemFree"></a>xmlMemFree ()</h3><pre class="programlisting">void xmlMemFree (void *ptr);</pre><p>
233a <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="free">free</GTKDOCLINK>() equivalent, with error checking.</p><p>
234
Daniel Veillard93d95252003-04-29 20:25:40 +0000235</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ptr</tt></i> :</span></td><td>
236
237
Daniel Veillardd4330462003-04-29 12:40:16 +0000238</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMemoryStrdup"></a>xmlMemoryStrdup ()</h3><pre class="programlisting">char* xmlMemoryStrdup (const char *str);</pre><p>
239a <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="strdup">strdup</GTKDOCLINK>() equivalent, with logging of the allocation info.</p><p>
240
Daniel Veillard93d95252003-04-29 20:25:40 +0000241</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str</tt></i> :</span></td><td>
242</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
243
244
Daniel Veillardd4330462003-04-29 12:40:16 +0000245</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMalloc"></a>xmlMalloc()</h3><pre class="programlisting">#define xmlMalloc(size)</pre><p>
246Wrapper for the <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="malloc">malloc</GTKDOCLINK>() function used in the XML library.</p><p>
247
Daniel Veillard93d95252003-04-29 20:25:40 +0000248</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>size</tt></i> :</span></td><td>
249
250
Daniel Veillardd4330462003-04-29 12:40:16 +0000251</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMallocAtomic"></a>xmlMallocAtomic()</h3><pre class="programlisting">#define xmlMallocAtomic(size)</pre><p>
252Wrapper for the <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="malloc">malloc</GTKDOCLINK>() function used in the XML library for allocation
253of block not containing pointers to other areas.</p><p>
254
Daniel Veillard93d95252003-04-29 20:25:40 +0000255</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>size</tt></i> :</span></td><td>
256
257
Daniel Veillardd4330462003-04-29 12:40:16 +0000258</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRealloc"></a>xmlRealloc()</h3><pre class="programlisting">#define xmlRealloc(ptr, size)</pre><p>
259Wrapper for the <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="realloc">realloc</GTKDOCLINK>() function used in the XML library.</p><p>
260
Daniel Veillard93d95252003-04-29 20:25:40 +0000261</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ptr</tt></i> :</span></td><td>
262</td></tr><tr><td><span class="term"><i><tt>size</tt></i> :</span></td><td>
263
264
Daniel Veillardd4330462003-04-29 12:40:16 +0000265</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMemStrdup"></a>xmlMemStrdup()</h3><pre class="programlisting">#define xmlMemStrdup(str)</pre><p>
266Wrapper for the <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="strdup">strdup</GTKDOCLINK>() function, <a href="libxml-parser.html#xmlStrdup">xmlStrdup</a>() is usually preferred.</p><p>
267
Daniel Veillard93d95252003-04-29 20:25:40 +0000268</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str</tt></i> :</span></td><td>
269
270
Daniel Veillardd4330462003-04-29 12:40:16 +0000271</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMallocLoc"></a>xmlMallocLoc ()</h3><pre class="programlisting">void* xmlMallocLoc (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="size-t">size_t</GTKDOCLINK> size,
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000272 const char *file,
Daniel Veillardd4330462003-04-29 12:40:16 +0000273 int line);</pre><p>
274a <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="malloc">malloc</GTKDOCLINK>() equivalent, with logging of the allocation info.</p><p>
275
Daniel Veillard93d95252003-04-29 20:25:40 +0000276</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>size</tt></i> :</span></td><td>
277</td></tr><tr><td><span class="term"><i><tt>file</tt></i> :</span></td><td>
278</td></tr><tr><td><span class="term"><i><tt>line</tt></i> :</span></td><td>
279
280
Daniel Veillardd4330462003-04-29 12:40:16 +0000281</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlReallocLoc"></a>xmlReallocLoc ()</h3><pre class="programlisting">void* xmlReallocLoc (void *ptr,
282 <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="size-t">size_t</GTKDOCLINK> size,
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000283 const char *file,
Daniel Veillardd4330462003-04-29 12:40:16 +0000284 int line);</pre><p>
285a <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="realloc">realloc</GTKDOCLINK>() equivalent, with logging of the allocation info.</p><p>
286
Daniel Veillard93d95252003-04-29 20:25:40 +0000287</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ptr</tt></i> :</span></td><td>
288</td></tr><tr><td><span class="term"><i><tt>size</tt></i> :</span></td><td>
289</td></tr><tr><td><span class="term"><i><tt>file</tt></i> :</span></td><td>
290</td></tr><tr><td><span class="term"><i><tt>line</tt></i> :</span></td><td>
291
292
Daniel Veillardd4330462003-04-29 12:40:16 +0000293</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlMemStrdupLoc"></a>xmlMemStrdupLoc ()</h3><pre class="programlisting">char* xmlMemStrdupLoc (const char *str,
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000294 const char *file,
Daniel Veillardd4330462003-04-29 12:40:16 +0000295 int line);</pre><p>
296a <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="strdup">strdup</GTKDOCLINK>() equivalent, with logging of the allocation info.</p><p>
297
Daniel Veillard93d95252003-04-29 20:25:40 +0000298</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str</tt></i> :</span></td><td>
299</td></tr><tr><td><span class="term"><i><tt>file</tt></i> :</span></td><td>
300</td></tr><tr><td><span class="term"><i><tt>line</tt></i> :</span></td><td>
301</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
302
303
Daniel Veillardd4330462003-04-29 12:40:16 +0000304</td></tr></tbody></table></div></div></div></div><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libxml-debugXML.html"><b>&lt;&lt; debugXML</b></a></td><td align="right"><a accesskey="n" href="libxml-xmlregexp.html"><b>xmlregexp &gt;&gt;</b></a></td></tr></table></body></html>