Debian Codegraph @

po/ru/man3/malloc_info.3.po

raw
1 # Russian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # aereiae <[email protected]>, 2014.
5 # Alexey <[email protected]>, 2015.
6 # Azamat Hackimov <[email protected]>, 2013-2017.
7 # Dmitriy S. Seregin <[email protected]>, 2013.
8 # Dmitry Bolkhovskikh <[email protected]>, 2017.
9 # ITriskTI <[email protected]>, 2013.
10 # Max Is <[email protected]>, 2016.
11 # Yuri Kozlov <[email protected]>, 2011-2019.
12 # Иван Павлов <[email protected]>, 2017.
13 # Малянов Евгений Викторович <[email protected]>, 2014.
14 msgid ""
15 msgstr ""
16 "Project-Id-Version: manpages-l10n\n"
17 "POT-Creation-Date: 2026-06-05 06:30+0200\n"
18 "PO-Revision-Date: 2024-12-21 19:50+0300\n"
19 "Last-Translator: Yuri Kozlov <[email protected]>\n"
20 "Language-Team: Russian <[email protected]>\n"
21 "Language: ru\n"
22 "MIME-Version: 1.0\n"
23 "Content-Type: text/plain; charset=UTF-8\n"
24 "Content-Transfer-Encoding: 8bit\n"
25 "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
26 "n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || "
27 "(n%100>=11 && n%100<=14)? 2 : 3);\n"
28 "X-Generator: Lokalize 2.0\n"
29
30 #. type: TH
31 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
32 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
33 #, fuzzy, no-wrap
34 #| msgid "B<malloc_info>()"
35 msgid "malloc_info"
36 msgstr "B<malloc_info>()"
37
38 #. type: TH
39 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
40 #: opensuse-tumbleweed
41 #, no-wrap
42 msgid "2026-02-08"
43 msgstr "8 февраля 2026 г."
44
45 #. type: TH
46 #: archlinux debian-unstable
47 #, fuzzy, no-wrap
48 #| msgid "Linux man-pages 6.17"
49 msgid "Linux man-pages 6.18"
50 msgstr "Справочные страницы Linux 6.17"
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "NAME"
57 msgstr "НАИМЕНОВАНИЕ"
58
59 #. type: Plain text
60 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
61 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "malloc_info - export malloc state to a stream"
63 msgstr "malloc_info - экспортирует состояние malloc в поток"
64
65 #. type: SH
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 #, no-wrap
69 msgid "LIBRARY"
70 msgstr "БИБЛИОТЕКА"
71
72 #. type: Plain text
73 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
74 #: opensuse-leap-16-1 opensuse-tumbleweed
75 msgid "Standard C library (I<libc>,\\ I<-lc>)"
76 msgstr "Стандартная библиотека языка C (I<libc>,\\ I<-lc>)"
77
78 #. type: SH
79 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
80 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
81 #, no-wrap
82 msgid "SYNOPSIS"
83 msgstr "СИНТАКСИС"
84
85 #. type: Plain text
86 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
87 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
88 #, no-wrap
89 msgid "B<#include E<lt>malloc.hE<gt>>\n"
90 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
91
92 #. type: Plain text
93 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
94 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
95 #, no-wrap
96 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
97 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
98
99 #. type: SH
100 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
101 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
102 #, no-wrap
103 msgid "DESCRIPTION"
104 msgstr "ОПИСАНИЕ"
105
106 #. type: Plain text
107 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
108 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
109 msgid ""
110 "The B<malloc_info>() function exports an XML string that describes the "
111 "current state of the memory-allocation implementation in the caller. The "
112 "string is printed on the file stream I<stream>. The exported string "
113 "includes information about all arenas (see B<malloc>(3))."
114 msgstr ""
115 "Функция B<malloc_info>() экспортирует строку XML, описывающую текущее "
116 "состояние реализации выделения памяти вызывающего. Строка печатается в "
117 "файловый поток I<stream>. В экспортируемой строке содержится информация о "
118 "всех областях (arenas) (смотрите B<malloc>(3))."
119
120 #. type: Plain text
121 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
122 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
123 msgid "As currently implemented, I<options> must be zero."
124 msgstr "В текущей реализации значение I<options> должно быть равно нулю."
125
126 #. type: SH
127 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
128 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
129 #, no-wrap
130 msgid "RETURN VALUE"
131 msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ"
132
133 #. type: Plain text
134 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
135 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
136 #, fuzzy
137 #| msgid ""
138 #| "On success, B<malloc_info>() returns 0; on error, it returns -1, with "
139 #| "I<errno> set to indicate the cause."
140 msgid ""
141 "On success, B<malloc_info>() returns 0. On failure, it returns -1, and "
142 "I<errno> is set to indicate the error."
143 msgstr ""
144 "При успешном выполнении B<malloc_info>() возвращается 0; при ошибке "
145 "возвращается -1, а в I<errno> помещается код ошибки."
146
147 #. type: SH
148 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
149 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
150 #, no-wrap
151 msgid "ERRORS"
152 msgstr "ОШИБКИ"
153
154 #. type: TP
155 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
156 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
157 #, no-wrap
158 msgid "B<EINVAL>"
159 msgstr "B<EINVAL>"
160
161 #. type: Plain text
162 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
163 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
164 msgid "I<options> was nonzero."
165 msgstr "Значение I<options> не равно."
166
167 #. type: SH
168 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
169 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
170 #, no-wrap
171 msgid "ATTRIBUTES"
172 msgstr "АТРИБУТЫ"
173
174 #. type: Plain text
175 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
176 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
177 msgid ""
178 "For an explanation of the terms used in this section, see B<attributes>(7)."
179 msgstr "Описание терминов данного раздела смотрите в B<attributes>(7)."
180
181 #. type: tbl table
182 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
183 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
184 #, no-wrap
185 msgid "Interface"
186 msgstr "Интерфейс"
187
188 #. type: tbl table
189 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
190 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
191 #, no-wrap
192 msgid "Attribute"
193 msgstr "Атрибут"
194
195 #. type: tbl table
196 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
197 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
198 #, no-wrap
199 msgid "Value"
200 msgstr "Значение"
201
202 #. type: tbl table
203 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
204 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
205 #, no-wrap
206 msgid ".na\n"
207 msgstr ".na\n"
208
209 #. type: tbl table
210 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
211 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
212 #, no-wrap
213 msgid ".nh\n"
214 msgstr ".nh\n"
215
216 #. type: tbl table
217 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
218 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
219 #, no-wrap
220 msgid "B<malloc_info>()"
221 msgstr "B<malloc_info>()"
222
223 #. type: tbl table
224 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
225 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
226 #, no-wrap
227 msgid "Thread safety"
228 msgstr "Безвредность в нитях"
229
230 #. type: tbl table
231 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
232 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
233 #, no-wrap
234 msgid "MT-Safe"
235 msgstr "MT-Safe"
236
237 #. type: SH
238 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
239 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
240 #, no-wrap
241 msgid "STANDARDS"
242 msgstr "СТАНДАРТЫ"
243
244 #. type: Plain text
245 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
246 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
247 msgid "GNU."
248 msgstr "GNU."
249
250 #. type: SH
251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
253 #, no-wrap
254 msgid "HISTORY"
255 msgstr "ИСТОРИЯ"
256
257 #. type: Plain text
258 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
259 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
260 #, fuzzy
261 #| msgid "Since glibc 2.10:"
262 msgid "glibc 2.10."
263 msgstr "Начиная с glibc 2.10:"
264
265 #. type: SH
266 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
267 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
268 #, no-wrap
269 msgid "NOTES"
270 msgstr "ПРИМЕЧАНИЯ"
271
272 #. type: Plain text
273 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
274 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
275 msgid ""
276 "The memory-allocation information is provided as an XML string (rather than "
277 "a C structure) because the information may change over time (according to "
278 "changes in the underlying implementation). The output XML string includes a "
279 "version field."
280 msgstr ""
281 "Информация о выделении памяти предоставляется в виде строки XML (а не в "
282 "структуре C), так как структура со временем может меняться (при изменении в "
283 "реализации). Возвращаемая строка XML содержит поле версии."
284
285 #. type: Plain text
286 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
287 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
288 msgid ""
289 "The B<open_memstream>(3) function can be used to send the output of "
290 "B<malloc_info>() directly into a buffer in memory, rather than to a file."
291 msgstr ""
292 "Для отправки вывода B<malloc_info>() в буфер памяти, а не в файл можно "
293 "использовать функцию B<open_memstream>(3)."
294
295 #. type: Plain text
296 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
297 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
298 msgid ""
299 "The B<malloc_info>() function is designed to address deficiencies in "
300 "B<malloc_stats>(3) and B<mallinfo>(3)."
301 msgstr ""
302 "Функция B<malloc_info>() разработана для компенсации нехватки данных из "
303 "B<malloc_stats>(3) и B<mallinfo>(3)."
304
305 #. type: SH
306 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
307 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
308 #, no-wrap
309 msgid "EXAMPLES"
310 msgstr "ПРИМЕРЫ"
311
312 #. type: Plain text
313 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
314 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
315 msgid ""
316 "The program below takes up to four command-line arguments, of which the "
317 "first three are mandatory. The first argument specifies the number of "
318 "threads that the program should create. All of the threads, including the "
319 "main thread, allocate the number of blocks of memory specified by the second "
320 "argument. The third argument controls the size of the blocks to be "
321 "allocated. The main thread creates blocks of this size, the second thread "
322 "created by the program allocates blocks of twice this size, the third thread "
323 "allocates blocks of three times this size, and so on."
324 msgstr ""
325 "Программа, представленная ниже, принимает до четырёх параметров командной "
326 "строки, три из которых обязательны. В первом параметре задаётся количество "
327 "нитей, которые должна создать программа. Все нити, включая главную нить, "
328 "выделяют количество блоков памяти, заданное в втором параметре. В третьем "
329 "параметре задаётся размер выделяемых блоков. Главная нить создает блоки "
330 "этого размера, вторая нить создаваемая программой, выделяет блоки "
331 "двукратного размера, третья нить выделяет блоки трёхкратного размера и так "
332 "далее."
333
334 #. type: Plain text
335 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
336 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
337 msgid ""
338 "The program calls B<malloc_info>() twice to display the memory-allocation "
339 "state. The first call takes place before any threads are created or memory "
340 "allocated. The second call is performed after all threads have allocated "
341 "memory."
342 msgstr ""
343 "Чтобы показать состояние выделения памяти программа дважды вызывает "
344 "B<malloc_info>(). Первый раз вызов делается до создания нитей и выделения "
345 "памяти. Второй вызов выполняется после того, как все нити выделят память."
346
347 #. type: Plain text
348 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
349 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
350 msgid ""
351 "In the following example, the command-line arguments specify the creation of "
352 "one additional thread, and both the main thread and the additional thread "
353 "allocate 10000 blocks of memory. After the blocks of memory have been "
354 "allocated, B<malloc_info>() shows the state of two allocation arenas."
355 msgstr ""
356 "В следующем примере аргументами командной строки задаётся создание одной "
357 "дополнительной нити и что главная и дополнительная нить выделяют 10000 "
358 "блоков памяти. После того, как блоки памяти выделены, B<malloc_info>() "
359 "показывает состояние двух областей выделения."
360
361 #. type: Plain text
362 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
363 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
364 #, fuzzy, no-wrap
365 #| msgid ""
366 #| "============ After allocating blocks ============\n"
367 #| "E<lt>malloc version=\"1\"E<gt>\n"
368 #| "E<lt>heap nr=\"0\"E<gt>\n"
369 #| "E<lt>sizesE<gt>\n"
370 #| "E<lt>/sizesE<gt>\n"
371 #| "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
372 #| "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
373 #| "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
374 #| "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
375 #| "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
376 #| "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
377 #| "E<lt>/heapE<gt>\n"
378 #| "E<lt>heap nr=\"1\"E<gt>\n"
379 #| "E<lt>sizesE<gt>\n"
380 #| "E<lt>/sizesE<gt>\n"
381 #| "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
382 #| "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
383 #| "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
384 #| "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
385 #| "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
386 #| "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
387 #| "E<lt>/heapE<gt>\n"
388 #| "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
389 #| "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
390 #| "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
391 #| "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
392 #| "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
393 #| "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
394 #| "E<lt>/mallocE<gt>\n"
395 msgid ""
396 "$ B<getconf GNU_LIBC_VERSION>\n"
397 "glibc 2.13\n"
398 "$ B<./a.out 1 10000 100>\n"
399 "============ Before allocating blocks ============\n"
400 "E<lt>malloc version=\"1\"E<gt>\n"
401 "E<lt>heap nr=\"0\"E<gt>\n"
402 "E<lt>sizesE<gt>\n"
403 "E<lt>/sizesE<gt>\n"
404 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
405 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
406 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
407 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
408 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
409 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
410 "E<lt>/heapE<gt>\n"
411 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
412 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
413 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
414 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
415 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
416 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
417 "E<lt>/mallocE<gt>\n"
418 "\\&\n"
419 "============ After allocating blocks ============\n"
420 "E<lt>malloc version=\"1\"E<gt>\n"
421 "E<lt>heap nr=\"0\"E<gt>\n"
422 "E<lt>sizesE<gt>\n"
423 "E<lt>/sizesE<gt>\n"
424 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
425 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
426 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
427 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
428 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
429 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
430 "E<lt>/heapE<gt>\n"
431 "E<lt>heap nr=\"1\"E<gt>\n"
432 "E<lt>sizesE<gt>\n"
433 "E<lt>/sizesE<gt>\n"
434 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
435 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
436 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
437 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
438 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
439 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
440 "E<lt>/heapE<gt>\n"
441 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
442 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
443 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
444 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
445 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
446 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
447 "E<lt>/mallocE<gt>\n"
448 msgstr ""
449 "============ после выделения блоков ============\n"
450 "E<lt>malloc version=\"1\"E<gt>\n"
451 "E<lt>heap nr=\"0\"E<gt>\n"
452 "E<lt>sizesE<gt>\n"
453 "E<lt>/sizesE<gt>\n"
454 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
455 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
456 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
457 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
458 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
459 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
460 "E<lt>/heapE<gt>\n"
461 "E<lt>heap nr=\"1\"E<gt>\n"
462 "E<lt>sizesE<gt>\n"
463 "E<lt>/sizesE<gt>\n"
464 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
465 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
466 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
467 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
468 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
469 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
470 "E<lt>/heapE<gt>\n"
471 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
472 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
473 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
474 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
475 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
476 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
477 "E<lt>/mallocE<gt>\n"
478
479 #. type: SS
480 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
481 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
482 #, no-wrap
483 msgid "Program source"
484 msgstr "Исходный код программы"
485
486 #. type: Plain text
487 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
488 #: opensuse-tumbleweed
489 #, no-wrap
490 msgid ""
491 "#include E<lt>err.hE<gt>\n"
492 "#include E<lt>errno.hE<gt>\n"
493 "#include E<lt>malloc.hE<gt>\n"
494 "#include E<lt>pthread.hE<gt>\n"
495 "#include E<lt>stdlib.hE<gt>\n"
496 "#include E<lt>unistd.hE<gt>\n"
497 "\\&\n"
498 "static size_t blockSize;\n"
499 "static size_t numThreads;\n"
500 "static unsigned int numBlocks;\n"
501 "\\&\n"
502 "static void *\n"
503 "thread_func(void *arg)\n"
504 "{\n"
505 " int tn = (int) arg;\n"
506 "\\&\n"
507 " /* The multiplier \\[aq](2 + tn)\\[aq] ensures that each thread (including\n"
508 " the main thread) allocates a different amount of memory. */\n"
509 "\\&\n"
510 " for (unsigned int j = 0; j E<lt> numBlocks; j++)\n"
511 " if (malloc(blockSize * (2 + tn)) == NULL)\n"
512 " err(EXIT_FAILURE, \"malloc-thread\");\n"
513 "\\&\n"
514 " sleep(100); /* Sleep until main thread terminates. */\n"
515 " return NULL;\n"
516 "}\n"
517 "\\&\n"
518 "int\n"
519 "main(int argc, char *argv[])\n"
520 "{\n"
521 " int sleepTime;\n"
522 " pthread_t *thr;\n"
523 "\\&\n"
524 " if (argc E<lt> 4) {\n"
525 " fprintf(stderr,\n"
526 " \"%s num-threads num-blocks block-size [sleep-time]\\[rs]n\",\n"
527 " argv[0]);\n"
528 " exit(EXIT_FAILURE);\n"
529 " }\n"
530 "\\&\n"
531 " numThreads = atoi(argv[1]);\n"
532 " numBlocks = atoi(argv[2]);\n"
533 " blockSize = atoi(argv[3]);\n"
534 " sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
535 "\\&\n"
536 " thr = calloc(numThreads, sizeof(*thr));\n"
537 " if (thr == NULL)\n"
538 " err(EXIT_FAILURE, \"calloc\");\n"
539 "\\&\n"
540 " printf(\"============ Before allocating blocks ============\\[rs]n\");\n"
541 " malloc_info(0, stdout);\n"
542 "\\&\n"
543 " /* Create threads that allocate different amounts of memory. */\n"
544 "\\&\n"
545 " for (size_t tn = 0; tn E<lt> numThreads; tn++) {\n"
546 " errno = pthread_create(&thr[tn], NULL, thread_func,\n"
547 " (void *) tn);\n"
548 " if (errno != 0)\n"
549 " err(EXIT_FAILURE, \"pthread_create\");\n"
550 "\\&\n"
551 " /* If we add a sleep interval after the start-up of each\n"
552 " thread, the threads likely won\\[aq]t contend for malloc\n"
553 " mutexes, and therefore additional arenas won\\[aq]t be\n"
554 " allocated (see malloc(3)). */\n"
555 "\\&\n"
556 " if (sleepTime E<gt> 0)\n"
557 " sleep(sleepTime);\n"
558 " }\n"
559 "\\&\n"
560 " /* The main thread also allocates some memory. */\n"
561 "\\&\n"
562 " for (unsigned int j = 0; j E<lt> numBlocks; j++)\n"
563 " if (malloc(blockSize) == NULL)\n"
564 " err(EXIT_FAILURE, \"malloc\");\n"
565 "\\&\n"
566 " sleep(2); /* Give all threads a chance to\n"
567 " complete allocations. */\n"
568 "\\&\n"
569 " printf(\"\\[rs]n============ After allocating blocks ============\\[rs]n\");\n"
570 " malloc_info(0, stdout);\n"
571 "\\&\n"
572 " exit(EXIT_SUCCESS);\n"
573 "}\n"
574 msgstr ""
575
576 #. SRC END
577 #. type: SH
578 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
579 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
580 #, no-wrap
581 msgid "SEE ALSO"
582 msgstr "СМОТРИТЕ ТАКЖЕ"
583
584 #. type: Plain text
585 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
586 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
587 msgid ""
588 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
589 "B<open_memstream>(3)"
590 msgstr ""
591 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
592 "B<open_memstream>(3)"
593
594 #. type: TH
595 #: debian-trixie
596 #, no-wrap
597 msgid "2024-06-15"
598 msgstr "15 июня 2024 г."
599
600 #. type: TH
601 #: debian-trixie
602 #, no-wrap
603 msgid "Linux man-pages 6.9.1"
604 msgstr "Страницы руководства Linux 6.9.1"
605
606 #. type: Plain text
607 #: debian-trixie
608 msgid "Standard C library (I<libc>, I<-lc>)"
609 msgstr "Стандартная библиотека языка C (I<libc>, I<-lc>)"
610
611 #. type: Plain text
612 #: debian-trixie fedora-44 fedora-rawhide
613 #, no-wrap
614 msgid ""
615 "#include E<lt>err.hE<gt>\n"
616 "#include E<lt>errno.hE<gt>\n"
617 "#include E<lt>malloc.hE<gt>\n"
618 "#include E<lt>pthread.hE<gt>\n"
619 "#include E<lt>stdlib.hE<gt>\n"
620 "#include E<lt>unistd.hE<gt>\n"
621 "\\&\n"
622 "static size_t blockSize;\n"
623 "static size_t numThreads;\n"
624 "static unsigned int numBlocks;\n"
625 "\\&\n"
626 "static void *\n"
627 "thread_func(void *arg)\n"
628 "{\n"
629 " int tn = (int) arg;\n"
630 "\\&\n"
631 " /* The multiplier \\[aq](2 + tn)\\[aq] ensures that each thread (including\n"
632 " the main thread) allocates a different amount of memory. */\n"
633 "\\&\n"
634 " for (unsigned int j = 0; j E<lt> numBlocks; j++)\n"
635 " if (malloc(blockSize * (2 + tn)) == NULL)\n"
636 " err(EXIT_FAILURE, \"malloc-thread\");\n"
637 "\\&\n"
638 " sleep(100); /* Sleep until main thread terminates. */\n"
639 " return NULL;\n"
640 "}\n"
641 "\\&\n"
642 "int\n"
643 "main(int argc, char *argv[])\n"
644 "{\n"
645 " int sleepTime;\n"
646 " pthread_t *thr;\n"
647 "\\&\n"
648 " if (argc E<lt> 4) {\n"
649 " fprintf(stderr,\n"
650 " \"%s num-threads num-blocks block-size [sleep-time]\\[rs]n\",\n"
651 " argv[0]);\n"
652 " exit(EXIT_FAILURE);\n"
653 " }\n"
654 "\\&\n"
655 " numThreads = atoi(argv[1]);\n"
656 " numBlocks = atoi(argv[2]);\n"
657 " blockSize = atoi(argv[3]);\n"
658 " sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
659 "\\&\n"
660 " thr = calloc(numThreads, sizeof(*thr));\n"
661 " if (thr == NULL)\n"
662 " err(EXIT_FAILURE, \"calloc\");\n"
663 "\\&\n"
664 " printf(\"============ Before allocating blocks ============\\[rs]n\");\n"
665 " malloc_info(0, stdout);\n"
666 "\\&\n"
667 " /* Create threads that allocate different amounts of memory. */\n"
668 "\\&\n"
669 " for (size_t tn = 0; tn E<lt> numThreads; tn++) {\n"
670 " errno = pthread_create(&thr[tn], NULL, thread_func,\n"
671 " (void *) tn);\n"
672 " if (errno != 0)\n"
673 " err(EXIT_FAILURE, \"pthread_create\");\n"
674 "\\&\n"
675 " /* If we add a sleep interval after the start-up of each\n"
676 " thread, the threads likely won\\[aq]t contend for malloc\n"
677 " mutexes, and therefore additional arenas won\\[aq]t be\n"
678 " allocated (see malloc(3)). */\n"
679 "\\&\n"
680 " if (sleepTime E<gt> 0)\n"
681 " sleep(sleepTime);\n"
682 " }\n"
683 "\\&\n"
684 " /* The main thread also allocates some memory. */\n"
685 "\\&\n"
686 " for (unsigned int j = 0; j E<lt> numBlocks; j++)\n"
687 " if (malloc(blockSize) == NULL)\n"
688 " err(EXIT_FAILURE, \"malloc\");\n"
689 "\\&\n"
690 " sleep(2); /* Give all threads a chance to\n"
691 " complete allocations. */\n"
692 "\\&\n"
693 " printf(\"\\[rs]n============ After allocating blocks ============\\[rs]n\");\n"
694 " malloc_info(0, stdout);\n"
695 "\\&\n"
696 " exit(EXIT_SUCCESS);\n"
697 "}\n"
698 msgstr ""
699
700 #. type: TH
701 #: fedora-44 fedora-rawhide
702 #, no-wrap
703 msgid "2024-07-23"
704 msgstr "23 июля 2024 г."
705
706 #. type: TH
707 #: fedora-44 fedora-rawhide
708 #, no-wrap
709 msgid "Linux man-pages 6.13"
710 msgstr "Страницы руководства Linux 6.13"
711
712 #. type: TH
713 #: mageia-cauldron
714 #, no-wrap
715 msgid "Linux man-pages 6.17"
716 msgstr "Страницы руководства Linux 6.17"
717
718 #. type: TH
719 #: opensuse-leap-16-1 opensuse-tumbleweed
720 #, no-wrap
721 msgid "Linux man-pages (unreleased)"
722 msgstr "Страницы руководства Linux (не выпущены)"