functions.xml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
  4. <section id="malloc_test.functions" xmlns:xi="http://www.w3.org/2001/XInclude">
  5. <sectioninfo>
  6. <revhistory>
  7. <revision>
  8. <revnumber>$Revision$</revnumber>
  9. <date>$Date$</date>
  10. </revision>
  11. </revhistory>
  12. </sectioninfo>
  13. <title>Functions</title>
  14. <section id="malloc_test.mt_mem_alloc">
  15. <title><function>mt_mem_alloc(size)</function></title>
  16. <para>
  17. Allocates size bytes.
  18. </para>
  19. <note><para>This is a debugging function for simulating memory
  20. leaks or stressing the memory allocator. It should not
  21. be used in production setups
  22. </para></note>
  23. <example>
  24. <title><function>men_alloc</function> usage</title>
  25. <programlisting>
  26. ...
  27. mem_alloc(1048576); # 1MB
  28. ...
  29. </programlisting>
  30. </example>
  31. </section>
  32. <section id="malloc_test.mt_mem_free">
  33. <title><function>mt_mem_free()</function></title>
  34. <para>
  35. Frees all the memory allocated with mem_alloc() up to this
  36. point.
  37. </para>
  38. <note><para>This is a debugging function for simulating memory
  39. leaks or stressing the memory allocator. It should not
  40. be used in production setups
  41. </para></note>
  42. <example>
  43. <title><function>mem_free</function> usage</title>
  44. <programlisting>
  45. ...
  46. mem_free();
  47. ...
  48. </programlisting>
  49. </example>
  50. </section>
  51. </section>