File: rpc_malloc_test.txt

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 (61 lines) | stat: -rw-r--r-- 2,561 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
RPC Exports for malloc_test
===========================

                  [ this file is autogenerated, do not edit ]


 1. mt.mem_alloc
        Allocates the specified number of bytes (debugging/test
        function).Use b|k|m|g to specify the desired size unit

 2. mt.mem_free
        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)

 3. mt.mem_realloc
        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 (<0 if bytes were freed, >0 if more bytes
        were allocated).Use b|k|m|g to specify the desired size unit

 4. mt.mem_used
        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.

 5. mt.mem_rnd_alloc
        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).

 6. mt.mem_test_start
        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)

 7. mt.mem_test_stop
        Takes 1 parameter: the test id. It will stop the corresponding
        test.Note: the test is stopped, but not destroyed.

 8. mt.mem_test_destroy
        Takes 1 parameter: the test id. It will destroy the
        corresponding test.

 9. mt.mem_test_destroy_all
        It will destroy all the tests (running or stopped).

10. mt.mem_test_list
        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)