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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
*/
/*
* Substitutes for glibc memory allocation routines, which take memory
* directly from the operating system, and therefore are safe to use from
* malloc hooks.
*/
void *;
void *;
void ;
void *;
/**
* Callback function for processing entries in /proc/self/maps.
*
* @param [in] arg User-defined argument.
* @param [in] addr Mapping start address.
* @param [in] length Mapping length.
* @param [in] prot Mapping memory protection flags (PROT_xx).
* @param [in] path Backing file path, or NULL for anonymous mapping.
*
* @return 0 to continue iteration, nonzero - stop iteration.
*/
typedef int ;
/**
* @return Page size on the system.
*/
size_t ;
/**
* Read and process entries from /proc/self/maps.
*
* @param [in] cb Callback function that would be called for each entry
* found in /proc/self/maps.
* @param [in] arg User-defined argument for the function.
*/
void ;
/**
* @brief Get the size of a shared memory segment, attached with shmat()
*
* @param [in] shmaddr Segment pointer.
* @return Segment size, or 0 if not found.
*/
size_t ;
/**
* @brief Convert a errno number to error string
*
* @param [in] en errno value
* @param [out] buf Buffer to put the error string in
* @param [in] max Size of the buffer
*/
void ;
void ;
/*
* Concatenate directory and file names into full path.
*
* @param buffer Filled with the result path.
* @param max Maximal buffer size.
* @param dir Directory name.
* @param file File name.
*
* @return Result buffer.
*/
char *;
/**
* Perform brk() syscall
*
* @param addr Address to set as new program break.
*
* @return New program break.
*
* @note If the break could not be changed (for example, parameter was invalid
* or exceeds limits) the break remains unchanged.
*/
void *;
/**
* @return System thread id of the current thread.
*/
pid_t ;
/**
* Get memory hooks mode to use, based on the configured mode and runtime.
*
* @param config_mode Configured memory hook mode.
*
* @return Memory hook mode to use.
*/
static UCS_F_ALWAYS_INLINE