2
0

malloc_test_functions.xml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. </sectioninfo>
  7. <title>Functions</title>
  8. <section id="malloc_test.mt_mem_alloc">
  9. <title><function>mt_mem_alloc(size)</function></title>
  10. <para>
  11. Allocates size bytes.
  12. </para>
  13. <note><para>This is a debugging function for simulating memory
  14. leaks or stressing the memory allocator. It should not
  15. be used in production setups
  16. </para></note>
  17. <example>
  18. <title><function>men_alloc</function> usage</title>
  19. <programlisting>
  20. ...
  21. mem_alloc(1048576); # 1MB
  22. ...
  23. </programlisting>
  24. </example>
  25. </section>
  26. <section id="malloc_test.mt_mem_free">
  27. <title><function>mt_mem_free()</function></title>
  28. <para>
  29. Frees all the memory allocated with mem_alloc() up to this
  30. point.
  31. </para>
  32. <note><para>This is a debugging function for simulating memory
  33. leaks or stressing the memory allocator. It should not
  34. be used in production setups
  35. </para></note>
  36. <example>
  37. <title><function>mem_free</function> usage</title>
  38. <programlisting>
  39. ...
  40. mem_free();
  41. ...
  42. </programlisting>
  43. </example>
  44. </section>
  45. </section>