IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
<h3><aname="DEBUG_MEMORY"id="DEBUG_MEMORY"></a>Macro: DEBUG_MEMORY</h3><pre>#define DEBUG_MEMORY</pre><p><ahref="libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a> replaces the allocator with a collect and debug shell to the libc allocator. <ahref="libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a> should only be activated when debugging libxml i.e. if libxml has been configured with --with-debug-mem too. #define DEBUG_MEMORY_FREED #define <ahref="libxml-xmlversion.html#DEBUG_MEMORY_LOCATION">DEBUG_MEMORY_LOCATION</a></p>
</pre><p>Signature for a free() implementation.</p><divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>mem</tt></i>:</span></td><td>an already allocated block of memory</td></tr></tbody></table></div><br/>
</pre><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>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>freeFunc</tt></i>:</span></td><td>place to save the free() function in use</td></tr><tr><td><spanclass="term"><i><tt>mallocFunc</tt></i>:</span></td><td>place to save the malloc() function in use</td></tr><tr><td><spanclass="term"><i><tt>mallocAtomicFunc</tt></i>:</span></td><td>place to save the atomic malloc() function in use</td></tr><tr><td><spanclass="term"><i><tt>reallocFunc</tt></i>:</span></td><td>place to save the realloc() function in use</td></tr><tr><td><spanclass="term"><i><tt>strdupFunc</tt></i>:</span></td><td>place to save the strdup() function in use</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div><h3><aname="xmlGcMemSetup"id="xmlGcMemSetup"></a>Function: xmlGcMemSetup</h3><preclass="programlisting">int xmlGcMemSetup (<ahref="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc, <br/><ahref="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc, <br/><ahref="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocAtomicFunc, <br/><ahref="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc, <br/><ahref="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc)<br/>
</pre><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>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>freeFunc</tt></i>:</span></td><td>the free() function to use</td></tr><tr><td><spanclass="term"><i><tt>mallocFunc</tt></i>:</span></td><td>the malloc() function to use</td></tr><tr><td><spanclass="term"><i><tt>mallocAtomicFunc</tt></i>:</span></td><td>the malloc() function to use for atomic allocations</td></tr><tr><td><spanclass="term"><i><tt>reallocFunc</tt></i>:</span></td><td>the realloc() function to use</td></tr><tr><td><spanclass="term"><i><tt>strdupFunc</tt></i>:</span></td><td>the strdup() function to use</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div><h3><aname="xmlInitMemory"id="xmlInitMemory"></a>Function: xmlInitMemory</h3><preclass="programlisting">int xmlInitMemory (void)<br/>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div><h3><aname="xmlMallocAtomicLoc"id="xmlMallocAtomicLoc"></a>Function: xmlMallocAtomicLoc</h3><preclass="programlisting">void * xmlMallocAtomicLoc (size_t size, <br/> const char * file, <br/> int line)<br/>
</pre><p>a malloc() equivalent, with logging of the allocation info.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><spanclass="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><spanclass="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div><h3><aname="xmlMallocFunc"id="xmlMallocFunc"></a>Function type: xmlMallocFunc</h3><preclass="programlisting">Function type: xmlMallocFunc
</pre><p>Signature for a malloc() implementation.</p><divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>size</tt></i>:</span></td><td>the size requested in bytes</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the newly allocated block or NULL in case of error.</td></tr></tbody></table></div><br/>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><spanclass="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><spanclass="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div><h3><aname="xmlMemBlocks"id="xmlMemBlocks"></a>Function: xmlMemBlocks</h3><preclass="programlisting">int xmlMemBlocks (void)<br/>
</pre><p>Provides the number of memory areas currently allocated</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>an int representing the number of blocks</td></tr></tbody></table></div><h3><aname="xmlMemDisplay"id="xmlMemDisplay"></a>Function: xmlMemDisplay</h3><preclass="programlisting">void xmlMemDisplay (FILE * fp)<br/>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>fp</tt></i>:</span></td><td>a FILE descriptor used as the output file, if NULL, the result is written to the file .memorylist</td></tr></tbody></table></div><h3><aname="xmlMemDisplayLast"id="xmlMemDisplayLast"></a>Function: xmlMemDisplayLast</h3><preclass="programlisting">void xmlMemDisplayLast (FILE * fp, <br/> long nbBytes)<br/>
</pre><p>the last nbBytes of memory allocated and not freed, useful for dumping the memory left allocated between two places at runtime.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>fp</tt></i>:</span></td><td>a FILE descriptor used as the output file, if NULL, the result is written to the file .memorylist</td></tr><tr><td><spanclass="term"><i><tt>nbBytes</tt></i>:</span></td><td>the amount of memory to dump</td></tr></tbody></table></div><h3><aname="xmlMemFree"id="xmlMemFree"></a>Function: xmlMemFree</h3><preclass="programlisting">void xmlMemFree (void * ptr)<br/>
</pre><p>Provides the memory access functions set currently in use</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>freeFunc</tt></i>:</span></td><td>place to save the free() function in use</td></tr><tr><td><spanclass="term"><i><tt>mallocFunc</tt></i>:</span></td><td>place to save the malloc() function in use</td></tr><tr><td><spanclass="term"><i><tt>reallocFunc</tt></i>:</span></td><td>place to save the realloc() function in use</td></tr><tr><td><spanclass="term"><i><tt>strdupFunc</tt></i>:</span></td><td>place to save the strdup() function in use</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div><h3><aname="xmlMemMalloc"id="xmlMemMalloc"></a>Function: xmlMemMalloc</h3><preclass="programlisting">void * xmlMemMalloc (size_t size)<br/>
</pre><p>a malloc() equivalent, with logging of the allocation info.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div><h3><aname="xmlMemRealloc"id="xmlMemRealloc"></a>Function: xmlMemRealloc</h3><preclass="programlisting">void * xmlMemRealloc (void * ptr, <br/> size_t size)<br/>
</pre><p>a realloc() equivalent, with logging of the allocation info.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ptr</tt></i>:</span></td><td>the initial memory block pointer</td></tr><tr><td><spanclass="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div><h3><aname="xmlMemSetup"id="xmlMemSetup"></a>Function: xmlMemSetup</h3><preclass="programlisting">int xmlMemSetup (<ahref="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc, <br/><ahref="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc, <br/><ahref="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc, <br/><ahref="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc)<br/>
</pre><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>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>freeFunc</tt></i>:</span></td><td>the free() function to use</td></tr><tr><td><spanclass="term"><i><tt>mallocFunc</tt></i>:</span></td><td>the malloc() function to use</td></tr><tr><td><spanclass="term"><i><tt>reallocFunc</tt></i>:</span></td><td>the realloc() function to use</td></tr><tr><td><spanclass="term"><i><tt>strdupFunc</tt></i>:</span></td><td>the strdup() function to use</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div><h3><aname="xmlMemShow"id="xmlMemShow"></a>Function: xmlMemShow</h3><preclass="programlisting">void xmlMemShow (FILE * fp, <br/> int nr)<br/>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>fp</tt></i>:</span></td><td>a FILE descriptor used as the output file</td></tr><tr><td><spanclass="term"><i><tt>nr</tt></i>:</span></td><td>number of entries to dump</td></tr></tbody></table></div><h3><aname="xmlMemStrdupLoc"id="xmlMemStrdupLoc"></a>Function: xmlMemStrdupLoc</h3><preclass="programlisting">char * xmlMemStrdupLoc (const char * str, <br/> const char * file, <br/> int line)<br/>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>str</tt></i>:</span></td><td>the initial string pointer</td></tr><tr><td><spanclass="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><spanclass="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new string or NULL if allocation error occurred.</td></tr></tbody></table></div><h3><aname="xmlMemUsed"id="xmlMemUsed"></a>Function: xmlMemUsed</h3><preclass="programlisting">int xmlMemUsed (void)<br/>
</pre><p>Provides the amount of memory currently allocated</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>an int representing the amount of memory allocated.</td></tr></tbody></table></div><h3><aname="xmlMemoryDump"id="xmlMemoryDump"></a>Function: xmlMemoryDump</h3><preclass="programlisting">void xmlMemoryDump (void)<br/>
</pre><p>Dump in-extenso the memory blocks allocated to the file .memorylist</p>
</pre><p>a strdup() equivalent, with logging of the allocation info.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>str</tt></i>:</span></td><td>the initial string pointer</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new string or NULL if allocation error occurred.</td></tr></tbody></table></div><h3><aname="xmlReallocFunc"id="xmlReallocFunc"></a>Function type: xmlReallocFunc</h3><preclass="programlisting">Function type: xmlReallocFunc
</pre><p>Signature for a realloc() implementation.</p><divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>mem</tt></i>:</span></td><td>an already allocated block of memory</td></tr><tr><td><spanclass="term"><i><tt>size</tt></i>:</span></td><td>the new size requested in bytes</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the newly reallocated block or NULL in case of error.</td></tr></tbody></table></div><br/>
</pre><p>a realloc() equivalent, with logging of the allocation info.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ptr</tt></i>:</span></td><td>the initial memory block pointer</td></tr><tr><td><spanclass="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><spanclass="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><spanclass="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div><h3><aname="xmlStrdupFunc"id="xmlStrdupFunc"></a>Function type: xmlStrdupFunc</h3><preclass="programlisting">Function type: xmlStrdupFunc
char * xmlStrdupFunc (const char * str)
</pre><p>Signature for an strdup() implementation.</p><divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>str</tt></i>:</span></td><td>a zero terminated string</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the copy of the string or NULL in case of error.</td></tr></tbody></table></div><br/>