File: rpc_malloc_test.xml

package info (click to toggle)
kamailio 5.4.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 65,796 kB
  • sloc: ansic: 712,305; xml: 188,548; cpp: 14,380; sh: 8,621; makefile: 8,052; sql: 7,828; yacc: 3,666; perl: 2,954; python: 2,228; java: 449; javascript: 269; php: 258; ruby: 225; cs: 40; awk: 27
file content (117 lines) | stat: -rw-r--r-- 3,588 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?xml version="1.0" encoding="UTF-8"?>
<!-- this file is autogenerated, do not edit! -->
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
	"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<chapter id="rpc_exports.malloc_test">
	<title>
RPC Exports for malloc_test
	</title>


<section id="mt.mem_alloc"><title>mt.mem_alloc</title>
<para>
        Allocates the specified number of bytes (debugging/test
        function).Use b|k|m|g to specify the desired size unit
</para>
<para>
</para>
</section>

<section id="mt.mem_free"><title>mt.mem_free</title>
<para>
        Frees the specified number of bytes, previously allocated by
        one of the other malloc_test functions (e.g. mt.mem_alloc or
        the script mt_mem_alloc). Use b|k|m|g to specify the desired
        size unit.Returns the number of bytes freed (can be higher or
        smaller then the requested size)
</para>
<para>
</para>
</section>

<section id="mt.mem_realloc"><title>mt.mem_realloc</title>
<para>
        Reallocates the specified number of bytes from a pre-allocated
        randomly selected memory chunk. If no pre-allocated memory
        chunks exists, it will fail. Make sure mt.mem_used is non 0 or
        call mt.mem_alloc prior to calling this function. Returns the
        difference in bytes (&lt;0 if bytes were freed, &gt;0 if more
        bytes were allocated).Use b|k|m|g to specify the desired size
        unit
</para>
<para>
</para>
</section>

<section id="mt.mem_used"><title>mt.mem_used</title>
<para>
        Returns how many memory chunks and how many bytes are currently
        allocated via the mem_alloc module functions. Use b|k|m|g to
        specify the desired size unit.
</para>
<para>
</para>
</section>

<section id="mt.mem_rnd_alloc"><title>mt.mem_rnd_alloc</title>
<para>
        Takes 4 parameters: min, max, total_size and an optional unit
        (b|k|m|g). It will allocate total_size memory, in pieces of
        random size betweenmin .. max (inclusive).
</para>
<para>
</para>
</section>

<section id="mt.mem_test_start"><title>mt.mem_test_start</title>
<para>
        Takes 7 parameters: min, max, total_size, min_interval,
        max_interval, test_time and an optional size unit (b|k|m|g).
        All the time units are ms. It will run a memory allocation test
        for test_time ms. At a random interval between min_interval and
        max_interval ms. it will allocate a memory chunk with random
        size, between min and max. Each time total_size is reached, it
        will free all the memory allocated and start again.Returns the
        test id (integer)
</para>
<para>
</para>
</section>

<section id="mt.mem_test_stop"><title>mt.mem_test_stop</title>
<para>
        Takes 1 parameter: the test id. It will stop the corresponding
        test.Note: the test is stopped, but not destroyed.
</para>
<para>
</para>
</section>

<section id="mt.mem_test_destroy"><title>mt.mem_test_destroy</title>
<para>
        Takes 1 parameter: the test id. It will destroy the
        corresponding test.
</para>
<para>
</para>
</section>

<section id="mt.mem_test_destroy_all"><title>mt.mem_test_destroy_all</title>
<para>
        It will destroy all the tests (running or stopped).
</para>
<para>
</para>
</section>

<section id="mt.mem_test_list"><title>mt.mem_test_list</title>
<para>
        If a test id parameter is provided it will list the
        corresponding test, else it will list all of them. Use b |k | m
        | g as a second parameter for the size units (default bytes)
</para>
<para>
</para>
</section>

</chapter>