Debian Codegraph @

po/ar/man3/malloc_info.3.po

raw
1 # Arabic translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # زايد السعيدي <[email protected]>, 2026.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n\n"
8 "POT-Creation-Date: 2026-06-05 06:30+0200\n"
9 "PO-Revision-Date: 2026-06-03 04:49+0400\n"
10 "Last-Translator: Zayed Al-Saidi <[email protected]>\n"
11 "Language-Team: Arabic <[email protected]>\n"
12 "Language: ar\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 ".MIME-Version: 1.0\n"
17 "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
18 "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
19 "X-Generator: Lokalize 23.08.5\n"
20
21 #. type: TH
22 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
23 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
24 #, no-wrap
25 msgid "malloc_info"
26 msgstr "malloc_info"
27
28 #. type: TH
29 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
30 #: opensuse-tumbleweed
31 #, no-wrap
32 msgid "2026-02-08"
33 msgstr "8 فبراير 2026"
34
35 #. type: TH
36 #: archlinux debian-unstable
37 #, no-wrap
38 msgid "Linux man-pages 6.18"
39 msgstr "صفحات دليل لينكس 6.18"
40
41 #. type: SH
42 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
43 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
44 #, no-wrap
45 msgid "NAME"
46 msgstr "الاسم"
47
48 #. type: Plain text
49 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
50 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
51 msgid "malloc_info - export malloc state to a stream"
52 msgstr "malloc_info - تصدير حالة malloc إلى دفق"
53
54 #. type: SH
55 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
56 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
57 #, no-wrap
58 msgid "LIBRARY"
59 msgstr "المكتبة"
60
61 #. type: Plain text
62 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
63 #: opensuse-leap-16-1 opensuse-tumbleweed
64 msgid "Standard C library (I<libc>,\\ I<-lc>)"
65 msgstr "مكتبة سي المعيارية (I<libc>،\\ I<-lc>)"
66
67 #. type: SH
68 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
69 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
70 #, no-wrap
71 msgid "SYNOPSIS"
72 msgstr "موجز"
73
74 #. type: Plain text
75 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
76 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
77 #, no-wrap
78 msgid "B<#include E<lt>malloc.hE<gt>>\n"
79 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
80
81 #. type: Plain text
82 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
83 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
84 #, no-wrap
85 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
86 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<stream>B<);>\n"
87
88 #. type: SH
89 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
90 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
91 #, no-wrap
92 msgid "DESCRIPTION"
93 msgstr "الوصف"
94
95 #. type: Plain text
96 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
97 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
98 msgid ""
99 "The B<malloc_info>() function exports an XML string that describes the "
100 "current state of the memory-allocation implementation in the caller. The "
101 "string is printed on the file stream I<stream>. The exported string "
102 "includes information about all arenas (see B<malloc>(3))."
103 msgstr ""
104 "تصدّر الدالة B<malloc_info>() سلسلة XML تصف الحالة الحالية لتنفيذ تخصيص "
105 "الذاكرة في المستدعي. تُطبع السلسلة على دفق الملف I<stream>. تتضمن السلسلة "
106 "المُصدّرة معلومات عن جميع الساحات (انظر B<malloc>(3))."
107
108 #. type: Plain text
109 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
110 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
111 msgid "As currently implemented, I<options> must be zero."
112 msgstr "كما هو مطبّق حالياً، يجب أن يكون I<options> صفراً."
113
114 #. type: SH
115 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
116 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
117 #, no-wrap
118 msgid "RETURN VALUE"
119 msgstr "قيمة الإرجاع"
120
121 #. type: Plain text
122 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
123 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
124 msgid ""
125 "On success, B<malloc_info>() returns 0. On failure, it returns -1, and "
126 "I<errno> is set to indicate the error."
127 msgstr ""
128 "عند النجاح، تُعيد B<malloc_info>() 0. عند الفشل، تُعيد -1، ويُضبط I<errno> "
129 "للإشارة إلى الخطأ."
130
131 #. type: SH
132 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
133 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
134 #, no-wrap
135 msgid "ERRORS"
136 msgstr "الأخطاء"
137
138 #. type: TP
139 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
140 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
141 #, no-wrap
142 msgid "B<EINVAL>"
143 msgstr "B<EINVAL>"
144
145 #. type: Plain text
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 msgid "I<options> was nonzero."
149 msgstr "I<options> كان غير صفري."
150
151 #. type: SH
152 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
153 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
154 #, no-wrap
155 msgid "ATTRIBUTES"
156 msgstr "السمات"
157
158 #. type: Plain text
159 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
160 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
161 msgid ""
162 "For an explanation of the terms used in this section, see B<attributes>(7)."
163 msgstr ""
164 "للاطلاع على شرح للمصطلحات المستخدمة في هذا القسم، انظر B<attributes>(7)."
165
166 #. type: tbl table
167 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
168 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
169 #, no-wrap
170 msgid "Interface"
171 msgstr "الواجهة"
172
173 #. type: tbl table
174 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
175 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
176 #, no-wrap
177 msgid "Attribute"
178 msgstr "السمة"
179
180 #. type: tbl table
181 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
182 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
183 #, no-wrap
184 msgid "Value"
185 msgstr "القيمة"
186
187 #. type: tbl table
188 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
189 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
190 #, no-wrap
191 msgid ".na\n"
192 msgstr ".na\n"
193
194 #. type: tbl table
195 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
196 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
197 #, no-wrap
198 msgid ".nh\n"
199 msgstr ".nh\n"
200
201 #. type: tbl table
202 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
203 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
204 #, no-wrap
205 msgid "B<malloc_info>()"
206 msgstr "B<malloc_info>()"
207
208 #. type: tbl table
209 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
210 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
211 #, no-wrap
212 msgid "Thread safety"
213 msgstr "سلامة الخيوط"
214
215 #. type: tbl table
216 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
217 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
218 #, no-wrap
219 msgid "MT-Safe"
220 msgstr "MT-Safe"
221
222 #. type: SH
223 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
224 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
225 #, no-wrap
226 msgid "STANDARDS"
227 msgstr "المعايير"
228
229 #. type: Plain text
230 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
231 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
232 msgid "GNU."
233 msgstr "GNU."
234
235 #. type: SH
236 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
237 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
238 #, no-wrap
239 msgid "HISTORY"
240 msgstr "التاريخ"
241
242 #. type: Plain text
243 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
244 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
245 msgid "glibc 2.10."
246 msgstr "glibc 2.10."
247
248 #. type: SH
249 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
250 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
251 #, no-wrap
252 msgid "NOTES"
253 msgstr "ملاحظات"
254
255 #. type: Plain text
256 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
257 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
258 msgid ""
259 "The memory-allocation information is provided as an XML string (rather than "
260 "a C structure) because the information may change over time (according to "
261 "changes in the underlying implementation). The output XML string includes a "
262 "version field."
263 msgstr ""
264 "تُقدّم معلومات تخصيص الذاكرة كسلسلة XML (بدلاً من بنية C) لأن المعلومات قد "
265 "تتغير بمرور الوقت (تبعاً للتغييرات في التنفيذ الأساسي). تتضمن سلسلة XML "
266 "الناتجة حقل إصدار."
267
268 #. type: Plain text
269 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
270 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
271 msgid ""
272 "The B<open_memstream>(3) function can be used to send the output of "
273 "B<malloc_info>() directly into a buffer in memory, rather than to a file."
274 msgstr ""
275 "يمكن استخدام الدالة B<open_memstream>(3) لإرسال مخرجات B<malloc_info>() "
276 "مباشرةً إلى مخزن مؤقت في الذاكرة، بدلاً من إرسالها إلى ملف."
277
278 #. type: Plain text
279 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
280 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
281 msgid ""
282 "The B<malloc_info>() function is designed to address deficiencies in "
283 "B<malloc_stats>(3) and B<mallinfo>(3)."
284 msgstr ""
285 "صُمّمت الدالة B<malloc_info>() لمعالجة أوجه القصور في B<malloc_stats>(3) و "
286 "B<mallinfo>(3)."
287
288 #. type: SH
289 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
290 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
291 #, no-wrap
292 msgid "EXAMPLES"
293 msgstr "أمثلة"
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 program below takes up to four command-line arguments, of which the "
300 "first three are mandatory. The first argument specifies the number of "
301 "threads that the program should create. All of the threads, including the "
302 "main thread, allocate the number of blocks of memory specified by the second "
303 "argument. The third argument controls the size of the blocks to be "
304 "allocated. The main thread creates blocks of this size, the second thread "
305 "created by the program allocates blocks of twice this size, the third thread "
306 "allocates blocks of three times this size, and so on."
307 msgstr ""
308 "يقبل البرنامج أدناه ما يصل إلى أربع وسائط لسطر الأوامر، أول ثلاث منها "
309 "إلزامية. تُحدد الوسيطة الأولى عدد الخيوط التي يجب أن ينشئها البرنامج. تُخصّص "
310 "جميع الخيوط، بما في ذلك الخيط الرئيس، عدد الكتل الذاكرية المُحدّد بالوسيطة "
311 "الثانية. تتحكم الوسيطة الثالثة في حجم الكتل التي سيتم تخصيصها. ينشئ الخيط "
312 "الرئيس كتلًا بهذا الحجم، ويُخصّص الخيط الثاني الذي أنشأه البرنامج كتلًا بحجم "
313 "مضاعف، ويُخصّص الخيط الثالث كتلًا بحجم ثلاثي، وهكذا."
314
315 #. type: Plain text
316 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
317 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
318 msgid ""
319 "The program calls B<malloc_info>() twice to display the memory-allocation "
320 "state. The first call takes place before any threads are created or memory "
321 "allocated. The second call is performed after all threads have allocated "
322 "memory."
323 msgstr ""
324 "يستدعي البرنامج B<malloc_info>() مرتين لعرض حالة تخصيص الذاكرة. يحدث "
325 "الاستدعاء الأول قبل إنشاء أي خيوط أو تخصيص ذاكرة. يُنفّذ الاستدعاء الثاني بعد "
326 "أن تُخصّص جميع الخيوط الذاكرة."
327
328 #. type: Plain text
329 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
330 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
331 msgid ""
332 "In the following example, the command-line arguments specify the creation of "
333 "one additional thread, and both the main thread and the additional thread "
334 "allocate 10000 blocks of memory. After the blocks of memory have been "
335 "allocated, B<malloc_info>() shows the state of two allocation arenas."
336 msgstr ""
337 "في المثال التالي، تُحدد وسائط سطر الأوامر إنشاء خيط إضافي واحد، ويُخصّص كل من "
338 "الخيط الرئيس والخيط الإضافي 10000 كتلة ذاكرة. بعد تخصيص كتل الذاكرة، يُظهر "
339 "B<malloc_info>() حالة ساحتي تخصيص."
340
341 #. type: Plain text
342 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
343 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
344 #, no-wrap
345 msgid ""
346 "$ B<getconf GNU_LIBC_VERSION>\n"
347 "glibc 2.13\n"
348 "$ B<./a.out 1 10000 100>\n"
349 "============ Before allocating blocks ============\n"
350 "E<lt>malloc version=\"1\"E<gt>\n"
351 "E<lt>heap nr=\"0\"E<gt>\n"
352 "E<lt>sizesE<gt>\n"
353 "E<lt>/sizesE<gt>\n"
354 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
355 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
356 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
357 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
358 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
359 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
360 "E<lt>/heapE<gt>\n"
361 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
362 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
363 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
364 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
365 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
366 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
367 "E<lt>/mallocE<gt>\n"
368 "\\&\n"
369 "============ After allocating blocks ============\n"
370 "E<lt>malloc version=\"1\"E<gt>\n"
371 "E<lt>heap nr=\"0\"E<gt>\n"
372 "E<lt>sizesE<gt>\n"
373 "E<lt>/sizesE<gt>\n"
374 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
375 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
376 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
377 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
378 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
379 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
380 "E<lt>/heapE<gt>\n"
381 "E<lt>heap nr=\"1\"E<gt>\n"
382 "E<lt>sizesE<gt>\n"
383 "E<lt>/sizesE<gt>\n"
384 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
385 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
386 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
387 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
388 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
389 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
390 "E<lt>/heapE<gt>\n"
391 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
392 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
393 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
394 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
395 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
396 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
397 "E<lt>/mallocE<gt>\n"
398 msgstr ""
399 "$ B<getconf GNU_LIBC_VERSION>\n"
400 "glibc 2.13\n"
401 "$ B<./a.out 1 10000 100>\n"
402 "============ Before allocating blocks ============\n"
403 "E<lt>malloc version=\"1\"E<gt>\n"
404 "E<lt>heap nr=\"0\"E<gt>\n"
405 "E<lt>sizesE<gt>\n"
406 "E<lt>/sizesE<gt>\n"
407 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
408 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
409 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
410 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
411 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
412 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
413 "E<lt>/heapE<gt>\n"
414 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
415 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
416 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
417 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
418 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
419 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
420 "E<lt>/mallocE<gt>\n"
421 "\\&\n"
422 "============ After allocating blocks ============\n"
423 "E<lt>malloc version=\"1\"E<gt>\n"
424 "E<lt>heap nr=\"0\"E<gt>\n"
425 "E<lt>sizesE<gt>\n"
426 "E<lt>/sizesE<gt>\n"
427 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
428 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
429 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
430 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
431 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
432 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
433 "E<lt>/heapE<gt>\n"
434 "E<lt>heap nr=\"1\"E<gt>\n"
435 "E<lt>sizesE<gt>\n"
436 "E<lt>/sizesE<gt>\n"
437 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
438 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
439 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
440 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
441 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
442 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
443 "E<lt>/heapE<gt>\n"
444 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
445 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
446 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
447 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
448 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
449 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
450 "E<lt>/mallocE<gt>\n"
451
452 #. type: SS
453 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
454 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
455 #, no-wrap
456 msgid "Program source"
457 msgstr "مصدر البرنامج"
458
459 #. type: Plain text
460 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
461 #: opensuse-tumbleweed
462 #, no-wrap
463 msgid ""
464 "#include E<lt>err.hE<gt>\n"
465 "#include E<lt>errno.hE<gt>\n"
466 "#include E<lt>malloc.hE<gt>\n"
467 "#include E<lt>pthread.hE<gt>\n"
468 "#include E<lt>stdlib.hE<gt>\n"
469 "#include E<lt>unistd.hE<gt>\n"
470 "\\&\n"
471 "static size_t blockSize;\n"
472 "static size_t numThreads;\n"
473 "static unsigned int numBlocks;\n"
474 "\\&\n"
475 "static void *\n"
476 "thread_func(void *arg)\n"
477 "{\n"
478 " int tn = (int) arg;\n"
479 "\\&\n"
480 " /* The multiplier \\[aq](2 + tn)\\[aq] ensures that each thread (including\n"
481 " the main thread) allocates a different amount of memory. */\n"
482 "\\&\n"
483 " for (unsigned int j = 0; j E<lt> numBlocks; j++)\n"
484 " if (malloc(blockSize * (2 + tn)) == NULL)\n"
485 " err(EXIT_FAILURE, \"malloc-thread\");\n"
486 "\\&\n"
487 " sleep(100); /* Sleep until main thread terminates. */\n"
488 " return NULL;\n"
489 "}\n"
490 "\\&\n"
491 "int\n"
492 "main(int argc, char *argv[])\n"
493 "{\n"
494 " int sleepTime;\n"
495 " pthread_t *thr;\n"
496 "\\&\n"
497 " if (argc E<lt> 4) {\n"
498 " fprintf(stderr,\n"
499 " \"%s num-threads num-blocks block-size [sleep-time]\\[rs]n\",\n"
500 " argv[0]);\n"
501 " exit(EXIT_FAILURE);\n"
502 " }\n"
503 "\\&\n"
504 " numThreads = atoi(argv[1]);\n"
505 " numBlocks = atoi(argv[2]);\n"
506 " blockSize = atoi(argv[3]);\n"
507 " sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
508 "\\&\n"
509 " thr = calloc(numThreads, sizeof(*thr));\n"
510 " if (thr == NULL)\n"
511 " err(EXIT_FAILURE, \"calloc\");\n"
512 "\\&\n"
513 " printf(\"============ Before allocating blocks ============\\[rs]n\");\n"
514 " malloc_info(0, stdout);\n"
515 "\\&\n"
516 " /* Create threads that allocate different amounts of memory. */\n"
517 "\\&\n"
518 " for (size_t tn = 0; tn E<lt> numThreads; tn++) {\n"
519 " errno = pthread_create(&thr[tn], NULL, thread_func,\n"
520 " (void *) tn);\n"
521 " if (errno != 0)\n"
522 " err(EXIT_FAILURE, \"pthread_create\");\n"
523 "\\&\n"
524 " /* If we add a sleep interval after the start-up of each\n"
525 " thread, the threads likely won\\[aq]t contend for malloc\n"
526 " mutexes, and therefore additional arenas won\\[aq]t be\n"
527 " allocated (see malloc(3)). */\n"
528 "\\&\n"
529 " if (sleepTime E<gt> 0)\n"
530 " sleep(sleepTime);\n"
531 " }\n"
532 "\\&\n"
533 " /* The main thread also allocates some memory. */\n"
534 "\\&\n"
535 " for (unsigned int j = 0; j E<lt> numBlocks; j++)\n"
536 " if (malloc(blockSize) == NULL)\n"
537 " err(EXIT_FAILURE, \"malloc\");\n"
538 "\\&\n"
539 " sleep(2); /* Give all threads a chance to\n"
540 " complete allocations. */\n"
541 "\\&\n"
542 " printf(\"\\[rs]n============ After allocating blocks ============\\[rs]n\");\n"
543 " malloc_info(0, stdout);\n"
544 "\\&\n"
545 " exit(EXIT_SUCCESS);\n"
546 "}\n"
547 msgstr ""
548 "#include E<lt>err.hE<gt>\n"
549 "#include E<lt>errno.hE<gt>\n"
550 "#include E<lt>malloc.hE<gt>\n"
551 "#include E<lt>pthread.hE<gt>\n"
552 "#include E<lt>stdlib.hE<gt>\n"
553 "#include E<lt>unistd.hE<gt>\n"
554 "\\&\n"
555 "static size_t blockSize;\n"
556 "static size_t numThreads;\n"
557 "static unsigned int numBlocks;\n"
558 "\\&\n"
559 "static void *\n"
560 "thread_func(void *arg)\n"
561 "{\n"
562 " int tn = (int) arg;\n"
563 "\\&\n"
564 " /* The multiplier \\[aq](2 + tn)\\[aq] ensures that each thread (including\n"
565 " the main thread) allocates a different amount of memory. */\n"
566 "\\&\n"
567 " for (unsigned int j = 0; j E<lt> numBlocks; j++)\n"
568 " if (malloc(blockSize * (2 + tn)) == NULL)\n"
569 " err(EXIT_FAILURE, \"malloc-thread\");\n"
570 "\\&\n"
571 " sleep(100); /* Sleep until main thread terminates. */\n"
572 " return NULL;\n"
573 "}\n"
574 "\\&\n"
575 "int\n"
576 "main(int argc, char *argv[])\n"
577 "{\n"
578 " int sleepTime;\n"
579 " pthread_t *thr;\n"
580 "\\&\n"
581 " if (argc E<lt> 4) {\n"
582 " fprintf(stderr,\n"
583 " \"%s num-threads num-blocks block-size [sleep-time]\\[rs]n\",\n"
584 " argv[0]);\n"
585 " exit(EXIT_FAILURE);\n"
586 " }\n"
587 "\\&\n"
588 " numThreads = atoi(argv[1]);\n"
589 " numBlocks = atoi(argv[2]);\n"
590 " blockSize = atoi(argv[3]);\n"
591 " sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
592 "\\&\n"
593 " thr = calloc(numThreads, sizeof(*thr));\n"
594 " if (thr == NULL)\n"
595 " err(EXIT_FAILURE, \"calloc\");\n"
596 "\\&\n"
597 " printf(\"============ Before allocating blocks ============\\[rs]n\");\n"
598 " malloc_info(0, stdout);\n"
599 "\\&\n"
600 " /* Create threads that allocate different amounts of memory. */\n"
601 "\\&\n"
602 " for (size_t tn = 0; tn E<lt> numThreads; tn++) {\n"
603 " errno = pthread_create(&thr[tn], NULL, thread_func,\n"
604 " (void *) tn);\n"
605 " if (errno != 0)\n"
606 " err(EXIT_FAILURE, \"pthread_create\");\n"
607 "\\&\n"
608 " /* If we add a sleep interval after the start-up of each\n"
609 " thread, the threads likely won\\[aq]t contend for malloc\n"
610 " mutexes, and therefore additional arenas won\\[aq]t be\n"
611 " allocated (see malloc(3)). */\n"
612 "\\&\n"
613 " if (sleepTime E<gt> 0)\n"
614 " sleep(sleepTime);\n"
615 " }\n"
616 "\\&\n"
617 " /* The main thread also allocates some memory. */\n"
618 "\\&\n"
619 " for (unsigned int j = 0; j E<lt> numBlocks; j++)\n"
620 " if (malloc(blockSize) == NULL)\n"
621 " err(EXIT_FAILURE, \"malloc\");\n"
622 "\\&\n"
623 " sleep(2); /* Give all threads a chance to\n"
624 " complete allocations. */\n"
625 "\\&\n"
626 " printf(\"\\[rs]n============ After allocating blocks ============\\[rs]n\");\n"
627 " malloc_info(0, stdout);\n"
628 "\\&\n"
629 " exit(EXIT_SUCCESS);\n"
630 "}\n"
631
632 #. SRC END
633 #. type: SH
634 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
635 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
636 #, no-wrap
637 msgid "SEE ALSO"
638 msgstr "انظر أيضًا"
639
640 #. type: Plain text
641 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
642 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
643 msgid ""
644 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
645 "B<open_memstream>(3)"
646 msgstr ""
647 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
648 "B<open_memstream>(3)"
649
650 #. type: TH
651 #: debian-trixie
652 #, no-wrap
653 msgid "2024-06-15"
654 msgstr "15 يونيو 2024"
655
656 #. type: TH
657 #: debian-trixie
658 #, no-wrap
659 msgid "Linux man-pages 6.9.1"
660 msgstr "صفحات دليل لينكس 6.9.1"
661
662 #. type: Plain text
663 #: debian-trixie
664 msgid "Standard C library (I<libc>, I<-lc>)"
665 msgstr "مكتبة سي المعيارية (I<libc>، I<-lc>)"
666
667 #. type: Plain text
668 #: debian-trixie fedora-44 fedora-rawhide
669 #, no-wrap
670 msgid ""
671 "#include E<lt>err.hE<gt>\n"
672 "#include E<lt>errno.hE<gt>\n"
673 "#include E<lt>malloc.hE<gt>\n"
674 "#include E<lt>pthread.hE<gt>\n"
675 "#include E<lt>stdlib.hE<gt>\n"
676 "#include E<lt>unistd.hE<gt>\n"
677 "\\&\n"
678 "static size_t blockSize;\n"
679 "static size_t numThreads;\n"
680 "static unsigned int numBlocks;\n"
681 "\\&\n"
682 "static void *\n"
683 "thread_func(void *arg)\n"
684 "{\n"
685 " int tn = (int) arg;\n"
686 "\\&\n"
687 " /* The multiplier \\[aq](2 + tn)\\[aq] ensures that each thread (including\n"
688 " the main thread) allocates a different amount of memory. */\n"
689 "\\&\n"
690 " for (unsigned int j = 0; j E<lt> numBlocks; j++)\n"
691 " if (malloc(blockSize * (2 + tn)) == NULL)\n"
692 " err(EXIT_FAILURE, \"malloc-thread\");\n"
693 "\\&\n"
694 " sleep(100); /* Sleep until main thread terminates. */\n"
695 " return NULL;\n"
696 "}\n"
697 "\\&\n"
698 "int\n"
699 "main(int argc, char *argv[])\n"
700 "{\n"
701 " int sleepTime;\n"
702 " pthread_t *thr;\n"
703 "\\&\n"
704 " if (argc E<lt> 4) {\n"
705 " fprintf(stderr,\n"
706 " \"%s num-threads num-blocks block-size [sleep-time]\\[rs]n\",\n"
707 " argv[0]);\n"
708 " exit(EXIT_FAILURE);\n"
709 " }\n"
710 "\\&\n"
711 " numThreads = atoi(argv[1]);\n"
712 " numBlocks = atoi(argv[2]);\n"
713 " blockSize = atoi(argv[3]);\n"
714 " sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
715 "\\&\n"
716 " thr = calloc(numThreads, sizeof(*thr));\n"
717 " if (thr == NULL)\n"
718 " err(EXIT_FAILURE, \"calloc\");\n"
719 "\\&\n"
720 " printf(\"============ Before allocating blocks ============\\[rs]n\");\n"
721 " malloc_info(0, stdout);\n"
722 "\\&\n"
723 " /* Create threads that allocate different amounts of memory. */\n"
724 "\\&\n"
725 " for (size_t tn = 0; tn E<lt> numThreads; tn++) {\n"
726 " errno = pthread_create(&thr[tn], NULL, thread_func,\n"
727 " (void *) tn);\n"
728 " if (errno != 0)\n"
729 " err(EXIT_FAILURE, \"pthread_create\");\n"
730 "\\&\n"
731 " /* If we add a sleep interval after the start-up of each\n"
732 " thread, the threads likely won\\[aq]t contend for malloc\n"
733 " mutexes, and therefore additional arenas won\\[aq]t be\n"
734 " allocated (see malloc(3)). */\n"
735 "\\&\n"
736 " if (sleepTime E<gt> 0)\n"
737 " sleep(sleepTime);\n"
738 " }\n"
739 "\\&\n"
740 " /* The main thread also allocates some memory. */\n"
741 "\\&\n"
742 " for (unsigned int j = 0; j E<lt> numBlocks; j++)\n"
743 " if (malloc(blockSize) == NULL)\n"
744 " err(EXIT_FAILURE, \"malloc\");\n"
745 "\\&\n"
746 " sleep(2); /* Give all threads a chance to\n"
747 " complete allocations. */\n"
748 "\\&\n"
749 " printf(\"\\[rs]n============ After allocating blocks ============\\[rs]n\");\n"
750 " malloc_info(0, stdout);\n"
751 "\\&\n"
752 " exit(EXIT_SUCCESS);\n"
753 "}\n"
754 msgstr ""
755 "#include E<lt>err.hE<gt>\n"
756 "#include E<lt>errno.hE<gt>\n"
757 "#include E<lt>malloc.hE<gt>\n"
758 "#include E<lt>pthread.hE<gt>\n"
759 "#include E<lt>stdlib.hE<gt>\n"
760 "#include E<lt>unistd.hE<gt>\n"
761 "\\&\n"
762 "static size_t blockSize;\n"
763 "static size_t numThreads;\n"
764 "static unsigned int numBlocks;\n"
765 "\\&\n"
766 "static void *\n"
767 "thread_func(void *arg)\n"
768 "{\n"
769 " int tn = (int) arg;\n"
770 "\\&\n"
771 " /* The multiplier \\[aq](2 + tn)\\[aq] ensures that each thread (including\n"
772 " the main thread) allocates a different amount of memory. */\n"
773 "\\&\n"
774 " for (unsigned int j = 0; j E<lt> numBlocks; j++)\n"
775 " if (malloc(blockSize * (2 + tn)) == NULL)\n"
776 " err(EXIT_FAILURE, \"malloc-thread\");\n"
777 "\\&\n"
778 " sleep(100); /* Sleep until main thread terminates. */\n"
779 " return NULL;\n"
780 "}\n"
781 "\\&\n"
782 "int\n"
783 "main(int argc, char *argv[])\n"
784 "{\n"
785 " int sleepTime;\n"
786 " pthread_t *thr;\n"
787 "\\&\n"
788 " if (argc E<lt> 4) {\n"
789 " fprintf(stderr,\n"
790 " \"%s num-threads num-blocks block-size [sleep-time]\\[rs]n\",\n"
791 " argv[0]);\n"
792 " exit(EXIT_FAILURE);\n"
793 " }\n"
794 "\\&\n"
795 " numThreads = atoi(argv[1]);\n"
796 " numBlocks = atoi(argv[2]);\n"
797 " blockSize = atoi(argv[3]);\n"
798 " sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
799 "\\&\n"
800 " thr = calloc(numThreads, sizeof(*thr));\n"
801 " if (thr == NULL)\n"
802 " err(EXIT_FAILURE, \"calloc\");\n"
803 "\\&\n"
804 " printf(\"============ Before allocating blocks ============\\[rs]n\");\n"
805 " malloc_info(0, stdout);\n"
806 "\\&\n"
807 " /* Create threads that allocate different amounts of memory. */\n"
808 "\\&\n"
809 " for (size_t tn = 0; tn E<lt> numThreads; tn++) {\n"
810 " errno = pthread_create(&thr[tn], NULL, thread_func,\n"
811 " (void *) tn);\n"
812 " if (errno != 0)\n"
813 " err(EXIT_FAILURE, \"pthread_create\");\n"
814 "\\&\n"
815 " /* If we add a sleep interval after the start-up of each\n"
816 " thread, the threads likely won\\[aq]t contend for malloc\n"
817 " mutexes, and therefore additional arenas won\\[aq]t be\n"
818 " allocated (see malloc(3)). */\n"
819 "\\&\n"
820 " if (sleepTime E<gt> 0)\n"
821 " sleep(sleepTime);\n"
822 " }\n"
823 "\\&\n"
824 " /* The main thread also allocates some memory. */\n"
825 "\\&\n"
826 " for (unsigned int j = 0; j E<lt> numBlocks; j++)\n"
827 " if (malloc(blockSize) == NULL)\n"
828 " err(EXIT_FAILURE, \"malloc\");\n"
829 "\\&\n"
830 " sleep(2); /* Give all threads a chance to\n"
831 " complete allocations. */\n"
832 "\\&\n"
833 " printf(\"\\[rs]n============ After allocating blocks ============\\[rs]n\");\n"
834 " malloc_info(0, stdout);\n"
835 "\\&\n"
836 " exit(EXIT_SUCCESS);\n"
837 "}\n"
838
839 #. type: TH
840 #: fedora-44 fedora-rawhide
841 #, no-wrap
842 msgid "2024-07-23"
843 msgstr "23 يوليو 2024"
844
845 #. type: TH
846 #: fedora-44 fedora-rawhide
847 #, no-wrap
848 msgid "Linux man-pages 6.13"
849 msgstr "صفحات دليل لينكس 6.13"
850
851 #. type: TH
852 #: mageia-cauldron
853 #, no-wrap
854 msgid "Linux man-pages 6.17"
855 msgstr "صفحات دليل لينكس 6.17"
856
857 #. type: TH
858 #: opensuse-leap-16-1 opensuse-tumbleweed
859 #, no-wrap
860 msgid "Linux man-pages (unreleased)"
861 msgstr "صفحات دليل لينكس (لم تصدر بعد)"