| 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 |
|
| 6 |
msgid "" |
| 7 |
msgstr "" |
| 8 |
"Project-Id-Version: manpages-l10n 4.30.2\n" |
| 9 |
"POT-Creation-Date: 2026-06-05 06:30+0200\n" |
| 10 |
"PO-Revision-Date: 2026-06-06 09:02+0400\n" |
| 11 |
"Last-Translator: Zayed Al-Saidi <[email protected]>\n" |
| 12 |
"Language-Team: Arabic <[email protected]>\n" |
| 13 |
"Language: ar\n" |
| 14 |
"MIME-Version: 1.0\n" |
| 15 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 16 |
"Content-Transfer-Encoding: 8bit\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" |
| 26 |
msgstr "malloc" |
| 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 "" |
| 52 |
"malloc, free, calloc, realloc, reallocarray - allocate and free dynamic " |
| 53 |
"memory" |
| 54 |
msgstr "" |
| 55 |
"malloc, free, calloc, realloc, reallocarray - تخصيص وتحرير الذاكرة " |
| 56 |
"الديناميكية" |
| 57 |
|
| 58 |
#. type: SH |
| 59 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 60 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 61 |
#, no-wrap |
| 62 |
msgid "LIBRARY" |
| 63 |
msgstr "المكتبة" |
| 64 |
|
| 65 |
#. type: Plain text |
| 66 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 67 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 68 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 69 |
msgstr "مكتبة سي المعيارية (I<libc>،\\ I<-lc>)" |
| 70 |
|
| 71 |
#. type: SH |
| 72 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 73 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 74 |
#, no-wrap |
| 75 |
msgid "SYNOPSIS" |
| 76 |
msgstr "موجز" |
| 77 |
|
| 78 |
#. type: Plain text |
| 79 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 80 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 81 |
#, no-wrap |
| 82 |
msgid "B<#include E<lt>stdlib.hE<gt>>\n" |
| 83 |
msgstr "B<#include E<lt>stdlib.hE<gt>>\n" |
| 84 |
|
| 85 |
#. type: Plain text |
| 86 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 87 |
#: opensuse-tumbleweed |
| 88 |
#, no-wrap |
| 89 |
msgid "" |
| 90 |
"B<void *malloc(size_t >I<size>B<);>\n" |
| 91 |
"B<void free(void *_Nullable >I<p>B<);>\n" |
| 92 |
"B<void *calloc(size_t >I<n>B<, size_t >I<size>B<);>\n" |
| 93 |
"B<void *realloc(void *_Nullable >I<p>B<, size_t >I<size>B<);>\n" |
| 94 |
"B<void *reallocarray(void *_Nullable >I<p>B<, size_t >I<n>B<, size_t >I<size" |
| 95 |
">B<);>\n" |
| 96 |
msgstr "" |
| 97 |
"B<void *malloc(size_t >I<size>B<);>\n" |
| 98 |
"B<void free(void *_Nullable >I<p>B<);>\n" |
| 99 |
"B<void *calloc(size_t >I<n>B<, size_t >I<size>B<);>\n" |
| 100 |
"B<void *realloc(void *_Nullable >I<p>B<, size_t >I<size>B<);>\n" |
| 101 |
"B<void *reallocarray(void *_Nullable >I<p>B<, size_t >I<n>B<, size_t >I<size" |
| 102 |
">B<);>\n" |
| 103 |
|
| 104 |
#. type: Plain text |
| 105 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 106 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 107 |
msgid "" |
| 108 |
"Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):" |
| 109 |
msgstr "" |
| 110 |
"متطلبات ماكروات اختبار الميزات لـ glibc (انظر B<feature_test_macros>(7)):" |
| 111 |
|
| 112 |
#. type: Plain text |
| 113 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 114 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 115 |
msgid "B<reallocarray>():" |
| 116 |
msgstr "B<reallocarray>():" |
| 117 |
|
| 118 |
#. type: Plain text |
| 119 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 120 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 121 |
#, no-wrap |
| 122 |
msgid "" |
| 123 |
" Since glibc 2.29:\n" |
| 124 |
" _DEFAULT_SOURCE\n" |
| 125 |
" glibc 2.28 and earlier:\n" |
| 126 |
" _GNU_SOURCE\n" |
| 127 |
msgstr "" |
| 128 |
" منذ glibc 2.29:\n" |
| 129 |
" _DEFAULT_SOURCE\n" |
| 130 |
" glibc 2.28 وما قبله:\n" |
| 131 |
" _GNU_SOURCE\n" |
| 132 |
|
| 133 |
#. type: SH |
| 134 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 135 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 136 |
#, no-wrap |
| 137 |
msgid "DESCRIPTION" |
| 138 |
msgstr "الوصف" |
| 139 |
|
| 140 |
#. type: SS |
| 141 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 142 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 143 |
#, no-wrap |
| 144 |
msgid "malloc()" |
| 145 |
msgstr "malloc()" |
| 146 |
|
| 147 |
#. type: Plain text |
| 148 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 149 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 150 |
msgid "" |
| 151 |
"The B<malloc>() function allocates I<size> bytes and returns a pointer to " |
| 152 |
"the allocated memory. I<The memory is not initialized>. If I<size> is 0, " |
| 153 |
"then B<malloc>() returns a unique pointer value that can later be " |
| 154 |
"successfully passed to B<free>(). (See \"Nonportable behavior\" for " |
| 155 |
"portability issues.)" |
| 156 |
msgstr "" |
| 157 |
"تخصص الدالة B<malloc>() I<size> بايت وتُعيد مؤشرًا إلى الذاكرة المخصصة. " |
| 158 |
"I<الذاكرة غير مهيأة>. إذا كان I<size> يساوي 0، تُعيد B<malloc>() قيمة مؤشر " |
| 159 |
"فريدة يمكن تمريرها لاحقًا بنجاح إلى B<free>(). (انظر \"سلوك غير محمول\" " |
| 160 |
"لمشكلات قابلية النقل.)" |
| 161 |
|
| 162 |
#. type: SS |
| 163 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 164 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 165 |
#, no-wrap |
| 166 |
msgid "free()" |
| 167 |
msgstr "free()" |
| 168 |
|
| 169 |
#. type: Plain text |
| 170 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 171 |
#: opensuse-tumbleweed |
| 172 |
msgid "" |
| 173 |
"The B<free>() function frees the memory space pointed to by I<p>, which " |
| 174 |
"must have been returned by a previous call to B<malloc>() or related " |
| 175 |
"functions. Otherwise, or if I<p> has already been freed, undefined behavior " |
| 176 |
"occurs. If I<p> is NULL, no operation is performed." |
| 177 |
msgstr "" |
| 178 |
"تحرر الدالة B<free>() مساحة الذاكرة المشار إليها بواسطة I<p>، والتي يجب أن " |
| 179 |
"تكون قد أُعيدت باستدعاء سابق لـ B<malloc>() أو دوال ذات صلة. وإلا، أو إذا كان " |
| 180 |
"I<p> قد حُرر بالفعل، يحدث سلوك غير محدد. إذا كان I<p> هو NULL، لا تُجرى أي " |
| 181 |
"عملية." |
| 182 |
|
| 183 |
#. type: SS |
| 184 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 185 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 186 |
#, no-wrap |
| 187 |
msgid "calloc()" |
| 188 |
msgstr "calloc()" |
| 189 |
|
| 190 |
#. type: Plain text |
| 191 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 192 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 193 |
msgid "" |
| 194 |
"The B<calloc>() function allocates memory for an array of I<n> elements of " |
| 195 |
"I<size> bytes each and returns a pointer to the allocated memory. The " |
| 196 |
"memory is set to zero. If I<n> or I<size> is 0, then B<calloc>() returns a " |
| 197 |
"unique pointer value that can later be successfully passed to B<free>()." |
| 198 |
msgstr "" |
| 199 |
"تخصص الدالة B<calloc>() ذاكرة لمصفوفة من I<n> عنصر، كل منها بحجم I<size> " |
| 200 |
"بايت، وتُعيد مؤشرًا إلى الذاكرة المخصصة. تُضبط الذاكرة على الصفر. إذا كان I<n" |
| 201 |
"> " |
| 202 |
"أو I<size> يساوي 0، تُعيد B<calloc>() قيمة مؤشر فريدة يمكن تمريرها لاحقًا " |
| 203 |
"بنجاح إلى B<free>()." |
| 204 |
|
| 205 |
#. type: Plain text |
| 206 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 207 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 208 |
msgid "" |
| 209 |
"If the multiplication of I<n> and I<size> would result in integer overflow, " |
| 210 |
"then B<calloc>() returns an error. By contrast, an integer overflow would " |
| 211 |
"not be detected in the following call to B<malloc>(), with the result that " |
| 212 |
"an incorrectly sized block of memory would be allocated:" |
| 213 |
msgstr "" |
| 214 |
"إذا أدى ضرب I<n> و I<size> إلى تجاوز عدد صحيح، تُعيد B<calloc>() خطأ. على " |
| 215 |
"النقيض، لا يُكتشف تجاوز عدد صحيح في الاستدعاء التالي لـ B<malloc>()، مما يؤدي " |
| 216 |
"إلى تخصيص كتلة ذاكرة بحجم غير صحيح:" |
| 217 |
|
| 218 |
#. type: Plain text |
| 219 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 220 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 221 |
#, no-wrap |
| 222 |
msgid "malloc(n * size);\n" |
| 223 |
msgstr "malloc(n * size);\n" |
| 224 |
|
| 225 |
#. type: SS |
| 226 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 227 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 228 |
#, no-wrap |
| 229 |
msgid "realloc()" |
| 230 |
msgstr "realloc()" |
| 231 |
|
| 232 |
#. type: Plain text |
| 233 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 234 |
#: opensuse-tumbleweed |
| 235 |
msgid "" |
| 236 |
"The B<realloc>() function changes the size of the memory block pointed to " |
| 237 |
"by I<p> to I<size> bytes. The contents of the memory will be unchanged in " |
| 238 |
"the range from the start of the region up to the minimum of the old and new " |
| 239 |
"sizes. If the new size is larger than the old size, the added memory will " |
| 240 |
"I<not> be initialized." |
| 241 |
msgstr "" |
| 242 |
"تغير الدالة B<realloc>() حجم كتلة الذاكرة المشار إليها بواسطة I<p> إلى " |
| 243 |
"I<size> بايت. تبقى محتويات الذاكرة دون تغيير في النطاق من بداية المنطقة حتى " |
| 244 |
"الحد الأدنى للحجمين القديم والجديد. إذا كان الحجم الجديد أكبر من الحجم " |
| 245 |
"القديم، فإن الذاكرة المضافة I<لن> تُهيأ." |
| 246 |
|
| 247 |
#. type: Plain text |
| 248 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 249 |
#: opensuse-tumbleweed |
| 250 |
msgid "" |
| 251 |
"If I<p> is NULL, then the call is equivalent to I<malloc(size)>, for all " |
| 252 |
"values of I<size>." |
| 253 |
msgstr "" |
| 254 |
"إذا كان I<p> هو NULL، فإن الاستدعاء يعادل I<malloc(size)>، لجميع قيم I<size>." |
| 255 |
|
| 256 |
#. type: Plain text |
| 257 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 258 |
#: opensuse-tumbleweed |
| 259 |
msgid "" |
| 260 |
"If I<size> is equal to zero, and I<p> is not NULL, then the call is " |
| 261 |
"equivalent to I<free(p)> (but see \"Nonportable behavior\" for portability " |
| 262 |
"issues)." |
| 263 |
msgstr "" |
| 264 |
"إذا كان I<size> يساوي صفرًا، و I<p> ليس NULL، فإن الاستدعاء يعادل I<free(p)> " |
| 265 |
"(ولكن انظر \"سلوك غير محمول\" لمشكلات قابلية النقل)." |
| 266 |
|
| 267 |
#. type: Plain text |
| 268 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 269 |
#: opensuse-tumbleweed |
| 270 |
msgid "" |
| 271 |
"Unless I<p> is NULL, it must have been returned by an earlier call to " |
| 272 |
"B<malloc> or related functions. If the area pointed to was moved, a " |
| 273 |
"I<free(p)> is done." |
| 274 |
msgstr "" |
| 275 |
"ما لم يكن I<p> هو NULL، يجب أن يكون قد أُعيد باستدعاء سابق لـ B<malloc> أو " |
| 276 |
"دوال ذات صلة. إذا نُقلت المنطقة المشار إليها، تُجرى I<free(p)>." |
| 277 |
|
| 278 |
#. type: SS |
| 279 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 280 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 281 |
#, no-wrap |
| 282 |
msgid "reallocarray()" |
| 283 |
msgstr "reallocarray()" |
| 284 |
|
| 285 |
#. type: Plain text |
| 286 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 287 |
#: opensuse-tumbleweed |
| 288 |
msgid "" |
| 289 |
"The B<reallocarray>() function changes the size of (and possibly moves) " |
| 290 |
"the memory block pointed to by I<p> to be large enough for an array of I<n> " |
| 291 |
"elements, each of which is I<size> bytes. It is equivalent to the call" |
| 292 |
msgstr "" |
| 293 |
"تغير الدالة B<reallocarray>() حجم (وربما تنقل) كتلة الذاكرة المشار إليها " |
| 294 |
"بواسطة I<p> لتكون كبيرة بما يكفي لمصفوفة من I<n> عنصر، كل منها بحجم I<size> " |
| 295 |
"بايت. وهي تعادل الاستدعاء" |
| 296 |
|
| 297 |
#. type: Plain text |
| 298 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 299 |
#: opensuse-tumbleweed |
| 300 |
#, no-wrap |
| 301 |
msgid "realloc(p, n * size);\n" |
| 302 |
msgstr "realloc(p, n * size);\n" |
| 303 |
|
| 304 |
#. type: Plain text |
| 305 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 306 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 307 |
msgid "" |
| 308 |
"However, unlike that B<realloc>() call, B<reallocarray>() fails safely in " |
| 309 |
"the case where the multiplication would overflow. If such an overflow " |
| 310 |
"occurs, B<reallocarray>() returns an error." |
| 311 |
msgstr "" |
| 312 |
"لكن، على عكس استدعاء B<realloc>() ذلك، تفشل B<reallocarray>() بأمان في " |
| 313 |
"حالة حدوث فائض في الضرب. إذا حدث مثل هذا الفائض، تُرجع B<reallocarray>() خطأ." |
| 314 |
|
| 315 |
#. type: SH |
| 316 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 317 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 318 |
#, no-wrap |
| 319 |
msgid "RETURN VALUE" |
| 320 |
msgstr "قيمة الإرجاع" |
| 321 |
|
| 322 |
#. type: Plain text |
| 323 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 324 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 325 |
msgid "" |
| 326 |
"The B<malloc>(), B<calloc>(), B<realloc>(), and B<reallocarray>() functions " |
| 327 |
"return a pointer to the allocated memory, which is suitably aligned for any " |
| 328 |
"type that fits into the requested size or less. On error, these functions " |
| 329 |
"return NULL and set I<errno>. Attempting to allocate more than " |
| 330 |
"B<PTRDIFF_MAX> bytes is considered an error, as an object that large could " |
| 331 |
"cause later pointer subtraction to overflow." |
| 332 |
msgstr "" |
| 333 |
"تُرجع دوال B<malloc>() وB<calloc>() وB<realloc>() وB<reallocarray>() مؤشرًا " |
| 334 |
"إلى الذاكرة المُخصصة، وهي مُحاذاة بشكل مناسب لأي نوع يناسب الحجم المطلوب أو " |
| 335 |
"أقل. عند حدوث خطأ، تُرجع هذه الدوال NULL وتُعيِّن I<errno>. تُعد محاولة تخصيص " |
| 336 |
"أكثر من B<PTRDIFF_MAX> بايت خطأ، لأن كائنًا بهذا الحجم قد يُسبب فائضًا في طرح " |
| 337 |
"المؤشرات لاحقًا." |
| 338 |
|
| 339 |
#. type: Plain text |
| 340 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 341 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 342 |
msgid "The B<free>() function returns no value, and preserves I<errno>." |
| 343 |
msgstr "لا تُرجع دالة B<free>() أي قيمة، وتحافظ على I<errno>." |
| 344 |
|
| 345 |
#. type: Plain text |
| 346 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 347 |
#: opensuse-tumbleweed |
| 348 |
msgid "" |
| 349 |
"The B<realloc>() and B<reallocarray>() functions return NULL if I<p> is " |
| 350 |
"not NULL and the requested size is zero; this is not considered an error. " |
| 351 |
"(See \"Nonportable behavior\" for portability issues.) Otherwise, the " |
| 352 |
"returned pointer may be the same as I<p> if the allocation was not moved (e." |
| 353 |
"g., there was room to expand the allocation in-place), or different from " |
| 354 |
"I<p> if the allocation was moved to a new address. If these functions fail, " |
| 355 |
"the original block is left untouched; it is not freed or moved." |
| 356 |
msgstr "" |
| 357 |
"تُرجع دالتا B<realloc>() وB<reallocarray>() NULL إذا كان I<p> ليس NULL وكان " |
| 358 |
"الحجم المطلوب صفرًا؛ لا يُعتبر هذا خطأ. (انظر \"سلوك غير محمول\" لمشكلات " |
| 359 |
"قابلية النقل.) خلاف ذلك، قد يكون المؤشر المُعاد هو نفسه I<p> إذا لم يُنقل " |
| 360 |
"التخصيص (مثلًا، وُجدت مساحة لتوسيع التخصيص في مكانه)، أو مختلفًا عن I<p> إذا " |
| 361 |
"نُقل التخصيص إلى عنوان جديد. إذا فشلت هاتان الدالتان، تُترك الكتلة الأصلية" |
| 362 |
" دون " |
| 363 |
"تغيير؛ لا تُحرر ولا تُنقل." |
| 364 |
|
| 365 |
#. type: SH |
| 366 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 367 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 368 |
#, no-wrap |
| 369 |
msgid "ERRORS" |
| 370 |
msgstr "الأخطاء" |
| 371 |
|
| 372 |
#. type: Plain text |
| 373 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 374 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 375 |
msgid "" |
| 376 |
"B<calloc>(), B<malloc>(), B<realloc>(), and B<reallocarray>() can fail with " |
| 377 |
"the following error:" |
| 378 |
msgstr "" |
| 379 |
"يمكن أن تفشل دوال B<calloc>() وB<malloc>() وB<realloc>() وB<reallocarray>() " |
| 380 |
"مع الخطأ التالي:" |
| 381 |
|
| 382 |
#. type: TP |
| 383 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 384 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 385 |
#, no-wrap |
| 386 |
msgid "B<ENOMEM>" |
| 387 |
msgstr "B<ENOMEM>" |
| 388 |
|
| 389 |
#. type: Plain text |
| 390 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 391 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 392 |
msgid "" |
| 393 |
"Out of memory. Possibly, the application hit the B<RLIMIT_AS> or " |
| 394 |
"B<RLIMIT_DATA> limit described in B<getrlimit>(2). Another reason could be " |
| 395 |
"that the number of mappings created by the caller process exceeded the limit " |
| 396 |
"specified by I</proc/sys/vm/max_map_count>." |
| 397 |
msgstr "" |
| 398 |
"نفاد الذاكرة. ربما بلغ التطبيق حد B<RLIMIT_AS> أو B<RLIMIT_DATA> الموصوف في " |
| 399 |
"B<getrlimit>(2). قد يكون سبب آخر هو أن عدد التعيينات التي أنشأتها عملية " |
| 400 |
"المُستدعي تجاوز الحد المُحدد بواسطة I</proc/sys/vm/max_map_count>." |
| 401 |
|
| 402 |
#. type: SH |
| 403 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 404 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 405 |
#, no-wrap |
| 406 |
msgid "ATTRIBUTES" |
| 407 |
msgstr "السمات" |
| 408 |
|
| 409 |
#. type: Plain text |
| 410 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 411 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 412 |
msgid "" |
| 413 |
"For an explanation of the terms used in this section, see B<attributes>(7)." |
| 414 |
msgstr "" |
| 415 |
"للاطلاع على شرح للمصطلحات المستخدمة في هذا القسم، انظر B<attributes>(7)." |
| 416 |
|
| 417 |
#. type: tbl table |
| 418 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 419 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 420 |
#, no-wrap |
| 421 |
msgid "Interface" |
| 422 |
msgstr "الواجهة" |
| 423 |
|
| 424 |
#. type: tbl table |
| 425 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 426 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 427 |
#, no-wrap |
| 428 |
msgid "Attribute" |
| 429 |
msgstr "السمة" |
| 430 |
|
| 431 |
#. type: tbl table |
| 432 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 433 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 434 |
#, no-wrap |
| 435 |
msgid "Value" |
| 436 |
msgstr "القيمة" |
| 437 |
|
| 438 |
#. type: tbl table |
| 439 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 440 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 441 |
#, no-wrap |
| 442 |
msgid ".na\n" |
| 443 |
msgstr ".na\n" |
| 444 |
|
| 445 |
#. type: tbl table |
| 446 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 447 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 448 |
#, no-wrap |
| 449 |
msgid ".nh\n" |
| 450 |
msgstr ".nh\n" |
| 451 |
|
| 452 |
#. type: tbl table |
| 453 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 454 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 455 |
#, no-wrap |
| 456 |
msgid "" |
| 457 |
"B<malloc>(),\n" |
| 458 |
"B<free>(),\n" |
| 459 |
"B<calloc>(),\n" |
| 460 |
"B<realloc>()" |
| 461 |
msgstr "" |
| 462 |
"B<malloc>(),\n" |
| 463 |
"B<free>(),\n" |
| 464 |
"B<calloc>(),\n" |
| 465 |
"B<realloc>()" |
| 466 |
|
| 467 |
#. type: tbl table |
| 468 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 469 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 470 |
#, no-wrap |
| 471 |
msgid "Thread safety" |
| 472 |
msgstr "سلامة الخيوط" |
| 473 |
|
| 474 |
#. type: tbl table |
| 475 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 476 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 477 |
#, no-wrap |
| 478 |
msgid "MT-Safe" |
| 479 |
msgstr "MT-Safe" |
| 480 |
|
| 481 |
#. type: SH |
| 482 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 483 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 484 |
#, no-wrap |
| 485 |
msgid "STANDARDS" |
| 486 |
msgstr "المعايير" |
| 487 |
|
| 488 |
#. type: TP |
| 489 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 490 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 491 |
#, no-wrap |
| 492 |
msgid "B<malloc>()" |
| 493 |
msgstr "B<malloc>()" |
| 494 |
|
| 495 |
#. type: TQ |
| 496 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 497 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 498 |
#, no-wrap |
| 499 |
msgid "B<free>()" |
| 500 |
msgstr "B<free>()" |
| 501 |
|
| 502 |
#. type: TQ |
| 503 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 504 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 505 |
#, no-wrap |
| 506 |
msgid "B<calloc>()" |
| 507 |
msgstr "B<calloc>()" |
| 508 |
|
| 509 |
#. type: TQ |
| 510 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 511 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 512 |
#, no-wrap |
| 513 |
msgid "B<realloc>()" |
| 514 |
msgstr "B<realloc>()" |
| 515 |
|
| 516 |
#. type: Plain text |
| 517 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 518 |
#: opensuse-tumbleweed |
| 519 |
msgid "C23, POSIX.1-2024." |
| 520 |
msgstr "C23، POSIX.1-2024." |
| 521 |
|
| 522 |
#. type: TP |
| 523 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 524 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 525 |
#, no-wrap |
| 526 |
msgid "B<reallocarray>()" |
| 527 |
msgstr "B<reallocarray>()" |
| 528 |
|
| 529 |
#. type: Plain text |
| 530 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 531 |
#: opensuse-tumbleweed |
| 532 |
msgid "POSIX.1-2024." |
| 533 |
msgstr "POSIX.1-2024." |
| 534 |
|
| 535 |
#. type: SS |
| 536 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 537 |
#: opensuse-tumbleweed |
| 538 |
#, no-wrap |
| 539 |
msgid "realloc(p, 0)" |
| 540 |
msgstr "realloc(p, 0)" |
| 541 |
|
| 542 |
#. type: Plain text |
| 543 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 544 |
#: opensuse-tumbleweed |
| 545 |
#| msgid "" |
| 546 |
#| "The behavior of I<realloc(p,\\~0)> in glibc doesn't conform to any of " |
| 547 |
#| "C99, C11, POSIX.1-2001, POSIX.1-2004, POSIX.1-2008, POSIX.1-2013, " |
| 548 |
#| "POSIX.1-2017, or POSIX.1-2024. The C17 specification was changed to make " |
| 549 |
#| "it conforming, but that specification made it impossible to write code " |
| 550 |
#| "that reliably determines if the input pointer is freed after I<realloc(p," |
| 551 |
#| "\\~0)>, and C23 changed it again to make this undefined behavior, " |
| 552 |
#| "acknowledging that the C17 specification was broad enough, so that " |
| 553 |
#| "undefined behavior wasn't worse than that." |
| 554 |
msgid "" |
| 555 |
"The behavior of I<realloc(p,\\ 0)> in glibc doesn't conform to any of C99, " |
| 556 |
"C11, POSIX.1-2001, POSIX.1-2004, POSIX.1-2008, POSIX.1-2013, POSIX.1-2017, " |
| 557 |
"or POSIX.1-2024. The C17 specification was changed to make it conforming, " |
| 558 |
"but that specification made it impossible to write code that reliably " |
| 559 |
"determines if the input pointer is freed after I<realloc(p,\\ 0)>, and C23 " |
| 560 |
"changed it again to make this undefined behavior, acknowledging that the C17 " |
| 561 |
"specification was broad enough, so that undefined behavior wasn't worse than " |
| 562 |
"that." |
| 563 |
msgstr "" |
| 564 |
"لا يتوافق سلوك I<realloc(p,\\0)> في glibc مع أي من C99 أو C11 أو " |
| 565 |
"POSIX.1-2001 أو POSIX.1-2004 أو POSIX.1-2008 أو POSIX.1-2013 أو POSIX.1-2017 " |
| 566 |
"أو POSIX.1-2024. غُيّرت مواصفات C17 لجعلها متوافقة، لكن تلك المواصفات جعلت من " |
| 567 |
"المستحيل كتابة كود يُحدد بشكل موثوق ما إذا كان المؤشر المُدخل قد حُرر بعد " |
| 568 |
"I<realloc(p,\\ 0)>، وغيّرتها C23 مرة أخرى لجعل هذا سلوكًا غير مُحدد، معترفةً" |
| 569 |
" بأن " |
| 570 |
"مواصفات C17 كانت واسعة بما يكفي، بحيث لم يكن السلوك غير المُحدد أسوأ من ذلك." |
| 571 |
|
| 572 |
#. type: Plain text |
| 573 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 574 |
#: opensuse-tumbleweed |
| 575 |
msgid "B<reallocarray>() suffers the same issues in glibc." |
| 576 |
msgstr "تعاني B<reallocarray>() من نفس المشكلات في glibc." |
| 577 |
|
| 578 |
#. type: Plain text |
| 579 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 580 |
#: opensuse-tumbleweed |
| 581 |
msgid "musl libc and the BSDs conform to all versions of ISO C and POSIX.1." |
| 582 |
msgstr "تتوافق musl libc و BSDs مع جميع إصدارات ISO C و POSIX.1." |
| 583 |
|
| 584 |
#. type: Plain text |
| 585 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 586 |
#: opensuse-tumbleweed |
| 587 |
msgid "" |
| 588 |
"gnulib provides the I<realloc-posix> module, which provides wrappers " |
| 589 |
"B<realloc>() and B<reallocarray>() that conform to all versions of ISO C " |
| 590 |
"and POSIX.1." |
| 591 |
msgstr "" |
| 592 |
"يوفر gnulib الوحدة I<realloc-posix>، التي تُوفر غلافات B<realloc>() " |
| 593 |
"وB<reallocarray>() تتوافق مع جميع إصدارات ISO C و POSIX.1." |
| 594 |
|
| 595 |
#. type: Plain text |
| 596 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 597 |
#: opensuse-tumbleweed |
| 598 |
msgid "" |
| 599 |
"There's a proposal to standardize the BSD behavior: E<.UR https:\\://www." |
| 600 |
"open-std.org/\\:jtc1/\\:sc22/\\:wg14/\\:www/\\:docs/\\:n3621.txt> E<.UE .>" |
| 601 |
msgstr "" |
| 602 |
"هناك اقتراح لتوحيد سلوك BSD: E<.UR https:\\://www.open-std.org/\\:jtc1/\\:" |
| 603 |
"sc22/\\:wg14/\\:www/\\:docs/\\:n3621.txt> E<.UE .>" |
| 604 |
|
| 605 |
#. type: SH |
| 606 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 607 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 608 |
#, no-wrap |
| 609 |
msgid "HISTORY" |
| 610 |
msgstr "التاريخ" |
| 611 |
|
| 612 |
#. type: Plain text |
| 613 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 614 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 615 |
msgid "POSIX.1-2001, C89." |
| 616 |
msgstr "POSIX.1-2001، C89." |
| 617 |
|
| 618 |
#. type: Plain text |
| 619 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 620 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 621 |
msgid "glibc 2.26. OpenBSD 5.6, FreeBSD 11.0." |
| 622 |
msgstr "glibc 2.26. OpenBSD 5.6, FreeBSD 11.0." |
| 623 |
|
| 624 |
#. type: Plain text |
| 625 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 626 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 627 |
msgid "" |
| 628 |
"B<malloc>() and related functions rejected sizes greater than " |
| 629 |
"B<PTRDIFF_MAX> starting in glibc 2.30." |
| 630 |
msgstr "" |
| 631 |
"رفضت B<malloc>() والدوال ذات الصلة الأحجام الأكبر من B<PTRDIFF_MAX> بدءًا من " |
| 632 |
"glibc 2.30." |
| 633 |
|
| 634 |
#. type: Plain text |
| 635 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 636 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 637 |
msgid "B<free>() preserved I<errno> starting in glibc 2.33." |
| 638 |
msgstr "الدالة B<free>() تحافظ على I<errno> ابتداءً من glibc 2.33." |
| 639 |
|
| 640 |
#. type: SS |
| 641 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 642 |
#: opensuse-tumbleweed |
| 643 |
#, no-wrap |
| 644 |
#| msgid "realloc(p, 0)" |
| 645 |
msgid "realloc(p,\\ 0)" |
| 646 |
msgstr "realloc(p,\\ 0)" |
| 647 |
|
| 648 |
#. type: Plain text |
| 649 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 650 |
#: opensuse-tumbleweed |
| 651 |
#| msgid "" |
| 652 |
#| "C89 was ambiguous in its specification of I<realloc(p,\\~0)>. C99 " |
| 653 |
#| "partially fixed this." |
| 654 |
msgid "" |
| 655 |
"C89 was ambiguous in its specification of I<realloc(p,\\ 0)>. C99 partially " |
| 656 |
"fixed this." |
| 657 |
msgstr "كانت مواصفات C89 غامضة بخصوص I<realloc(p,\\ 0)>. صحّح C99 هذا جزئيًا." |
| 658 |
|
| 659 |
#. type: Plain text |
| 660 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 661 |
#: opensuse-tumbleweed |
| 662 |
msgid "" |
| 663 |
"The original implementation in glibc would have been conforming to C99. " |
| 664 |
"However, and ironically, trying to comply with C99 before the standard was " |
| 665 |
"released, glibc changed its behavior in glibc 2.1.1 into something that " |
| 666 |
"ended up not conforming to the final C99 specification (but this is debated, " |
| 667 |
"as the wording of the standard seems self-contradicting)." |
| 668 |
msgstr "" |
| 669 |
"كان التنفيذ الأصلي في glibc متوافقًا مع C99. لكن، ومن المفارقات، أن محاولة " |
| 670 |
"الامتثال لـ C99 قبل إصدار المعيار، غيّرت glibc سلوكها في glibc 2.1.1 إلى شيء " |
| 671 |
"لم ينتهِ به المطاف متوافقًا مع مواصفات C99 النهائية (لكن هذا محل جدل، إذ تبدو " |
| 672 |
"صياغة المعيار متناقضة مع ذاتها)." |
| 673 |
|
| 674 |
#. type: SH |
| 675 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 676 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 677 |
#, no-wrap |
| 678 |
msgid "NOTES" |
| 679 |
msgstr "ملاحظات" |
| 680 |
|
| 681 |
#. type: Plain text |
| 682 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 683 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 684 |
msgid "" |
| 685 |
"By default, Linux follows an optimistic memory allocation strategy. This " |
| 686 |
"means that when B<malloc>() returns non-NULL there is no guarantee that the " |
| 687 |
"memory really is available. In case it turns out that the system is out of " |
| 688 |
"memory, one or more processes will be killed by the OOM killer. For more " |
| 689 |
"information, see the description of I</proc/sys/vm/overcommit_memory> and I</" |
| 690 |
"proc/sys/vm/oom_adj> in B<proc>(5), and the Linux kernel source file " |
| 691 |
"I<Documentation/vm/overcommit-accounting.rst>." |
| 692 |
msgstr "" |
| 693 |
"مبدئيًا، يتبع لينكس استراتيجية تفاؤلية لتخصيص الذاكرة. هذا يعني أنه عندما " |
| 694 |
"تُرجع B<malloc>() قيمة غير NULL، فلا يوجد ضمان بأن الذاكرة متاحة فعلًا. في" |
| 695 |
" حال " |
| 696 |
"اتضح أن النظام قد نفدت ذاكرته، فسيُقتل عملية أو أكثر بواسطة قاتل OOM. لمزيد " |
| 697 |
"من المعلومات، انظر وصف I</proc/sys/vm/overcommit_memory> و I</proc/sys/vm/" |
| 698 |
"oom_adj> في B<proc>(5)، وملف مصدر نواة لينكس I<Documentation/vm/overcommit-" |
| 699 |
"accounting.rst>." |
| 700 |
|
| 701 |
#. type: Plain text |
| 702 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 703 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 704 |
msgid "" |
| 705 |
"Normally, B<malloc>() allocates memory from the heap, and adjusts the size " |
| 706 |
"of the heap as required, using B<sbrk>(2). When allocating blocks of memory " |
| 707 |
"larger than B<MMAP_THRESHOLD> bytes, the glibc B<malloc>() implementation " |
| 708 |
"allocates the memory as a private anonymous mapping using B<mmap>(2). " |
| 709 |
"B<MMAP_THRESHOLD> is 128\\ kB by default, but is adjustable using " |
| 710 |
"B<mallopt>(3). Prior to Linux 4.7 allocations performed using B<mmap>(2) " |
| 711 |
"were unaffected by the B<RLIMIT_DATA> resource limit; since Linux 4.7, this " |
| 712 |
"limit is also enforced for allocations performed using B<mmap>(2)." |
| 713 |
msgstr "" |
| 714 |
"عادةً، تخصص B<malloc>() الذاكرة من الكومة، وتضبط حجم الكومة حسب الحاجة، " |
| 715 |
"باستخدام B<sbrk>(2). عند تخصيص كتل ذاكرة أكبر من B<MMAP_THRESHOLD> بايت، " |
| 716 |
"ينفذ تنفيذ glibc لـ B<malloc>() تخصيص الذاكرة كتعيين مجهول خاص باستخدام " |
| 717 |
"B<mmap>(2). قيمة B<MMAP_THRESHOLD> هي 128 كيلوبايت مبدئيًا، لكنها قابلة للضبط " |
| 718 |
"باستخدام B<mallopt>(3). قبل لينكس 4.7، لم تتأثر التخصيصات المنفذة باستخدام " |
| 719 |
"B<mmap>(2) بحد المورد B<RLIMIT_DATA>؛ منذ لينكس 4.7، يُطبّق هذا الحد أيضًا" |
| 720 |
" على " |
| 721 |
"التخصيصات المنفذة باستخدام B<mmap>(2)." |
| 722 |
|
| 723 |
#. type: Plain text |
| 724 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 725 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 726 |
msgid "" |
| 727 |
"To avoid corruption in multithreaded applications, mutexes are used " |
| 728 |
"internally to protect the memory-management data structures employed by " |
| 729 |
"these functions. In a multithreaded application in which threads " |
| 730 |
"simultaneously allocate and free memory, there could be contention for these " |
| 731 |
"mutexes. To scalably handle memory allocation in multithreaded " |
| 732 |
"applications, glibc creates additional I<memory allocation arenas> if mutex " |
| 733 |
"contention is detected. Each arena is a large region of memory that is " |
| 734 |
"internally allocated by the system (using B<brk>(2) or B<mmap>(2)), and " |
| 735 |
"managed with its own mutexes." |
| 736 |
msgstr "" |
| 737 |
"لتجنب الفساد في التطبيقات متعددة الخيوط، تُستخدم كائنات المزامنة (mutexes) " |
| 738 |
"داخليًا لحماية هياكل بيانات إدارة الذاكرة التي توظفها هذه الدوال. في تطبيق " |
| 739 |
"متعدد الخيوط حيث تخصص الخيوط الذاكرة وتحررها في وقت واحد، قد يحدث تنافس على " |
| 740 |
"كائنات المزامنة هذه. للتعامل مع تخصيص الذاكرة بشكل قابل للتوسع في التطبيقات " |
| 741 |
"متعددة الخيوط، تنشئ glibc I<ساحات تخصيص ذاكرة> إضافية إذا اكتُشف تنافس على " |
| 742 |
"كائن المزامنة. كل ساحة هي منطقة كبيرة من الذاكرة تخصصها النظام داخليًا " |
| 743 |
"(باستخدام B<brk>(2) أو B<mmap>(2))، وتُدار بكائنات المزامنة الخاصة بها." |
| 744 |
|
| 745 |
#. type: Plain text |
| 746 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 747 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 748 |
msgid "" |
| 749 |
"If your program uses a private memory allocator, it should do so by " |
| 750 |
"replacing B<malloc>(), B<free>(), B<calloc>(), and B<realloc>(). The " |
| 751 |
"replacement functions must implement the documented glibc behaviors, " |
| 752 |
"including I<errno> handling, size-zero allocations, and overflow checking; " |
| 753 |
"otherwise, other library routines may crash or operate incorrectly. For " |
| 754 |
"example, if the replacement I<free>() does not preserve I<errno>, then " |
| 755 |
"seemingly unrelated library routines may fail without having a valid reason " |
| 756 |
"in I<errno>. Private memory allocators may also need to replace other glibc " |
| 757 |
"functions; see \"Replacing malloc\" in the glibc manual for details." |
| 758 |
msgstr "" |
| 759 |
"إذا استخدم برنامجك مخصص ذاكرة خاصًا، فيجب أن يفعل ذلك عن طريق استبدال " |
| 760 |
"B<malloc>() و B<free>() و B<calloc>() و B<realloc>(). يجب أن تنفذ دوال " |
| 761 |
"الاستبدال السلوكيات الموثقة لـ glibc، بما في ذلك معالجة I<errno>، وتخصيصات " |
| 762 |
"الحجم صفر، والتحقق من الفائض؛ وإلا، فقد تتعطل أو تعمل بشكل غير صحيح روتينات " |
| 763 |
"مكتبة أخرى. على سبيل المثال، إذا لم تحافظ دالة I<free>() البديلة على " |
| 764 |
"I<errno>، فقد تفشل روتينات مكتبة تبدو غير ذات صلة دون سبب صحيح في I<errno>. " |
| 765 |
"قد تحتاج مخصصات الذاكرة الخاصة أيضًا إلى استبدال دوال glibc أخرى؛ انظر " |
| 766 |
"\"Replacing malloc\" في دليل glibc للتفاصيل." |
| 767 |
|
| 768 |
#. type: Plain text |
| 769 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 770 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 771 |
msgid "" |
| 772 |
"Crashes in memory allocators are almost always related to heap corruption, " |
| 773 |
"such as overflowing an allocated chunk or freeing the same pointer twice." |
| 774 |
msgstr "" |
| 775 |
"ترتبط الأعطال في مخصصات الذاكرة دائمًا تقريبًا بفساد الكومة، مثل تجاوز سعة " |
| 776 |
"قطعة مخصصة أو تحرير نفس المؤشر مرتين." |
| 777 |
|
| 778 |
#. type: Plain text |
| 779 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 780 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 781 |
msgid "" |
| 782 |
"The B<malloc>() implementation is tunable via environment variables; see " |
| 783 |
"B<mallopt>(3) for details." |
| 784 |
msgstr "" |
| 785 |
"تنفيذ B<malloc>() قابل للضبط عبر متغيرات البيئة؛ انظر B<mallopt>(3) للتفاصيل." |
| 786 |
|
| 787 |
#. type: SS |
| 788 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 789 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 790 |
#, no-wrap |
| 791 |
msgid "Nonportable behavior" |
| 792 |
msgstr "سلوك غير محمول" |
| 793 |
|
| 794 |
#. type: Plain text |
| 795 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 796 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 797 |
msgid "" |
| 798 |
"The behavior of these functions when the requested size is zero is glibc " |
| 799 |
"specific; other implementations may return NULL without setting I<errno>, " |
| 800 |
"and portable POSIX programs should tolerate such behavior. See " |
| 801 |
"B<realloc>(3p)." |
| 802 |
msgstr "" |
| 803 |
"سلوك هذه الدوال عندما يكون الحجم المطلوب صفرًا خاص بـ glibc؛ قد تُرجع تطبيقات " |
| 804 |
"أخرى NULL دون تعيين I<errno>، ويجب على برامج POSIX المحمولة تحمل مثل هذا " |
| 805 |
"السلوك. انظر B<realloc>(3p)." |
| 806 |
|
| 807 |
#. type: Plain text |
| 808 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 809 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 810 |
msgid "" |
| 811 |
"POSIX requires memory allocators to set I<errno> upon failure. However, the " |
| 812 |
"C standard does not require this, and applications portable to non-POSIX " |
| 813 |
"platforms should not assume this." |
| 814 |
msgstr "" |
| 815 |
"يتطلب POSIX من مخصصات الذاكرة تعيين I<errno> عند الفشل. لكن، لا يتطلب معيار " |
| 816 |
"C هذا، ولا ينبغي للتطبيقات المحمولة إلى منصات غير POSIX افتراض ذلك." |
| 817 |
|
| 818 |
#. type: Plain text |
| 819 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 820 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 821 |
msgid "" |
| 822 |
"Portable programs should not use private memory allocators, as POSIX and the " |
| 823 |
"C standard do not allow replacement of B<malloc>(), B<free>(), B<calloc>(), " |
| 824 |
"and B<realloc>()." |
| 825 |
msgstr "" |
| 826 |
"لا ينبغي للبرامج المحمولة استخدام مخصصات ذاكرة خاصة، إذ لا يسمح POSIX ومعيار " |
| 827 |
"C باستبدال B<malloc>() و B<free>() و B<calloc>() و B<realloc>()." |
| 828 |
|
| 829 |
#. type: SH |
| 830 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 831 |
#: opensuse-tumbleweed |
| 832 |
#, no-wrap |
| 833 |
msgid "BUGS" |
| 834 |
msgstr "العلل" |
| 835 |
|
| 836 |
#. type: Plain text |
| 837 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 838 |
#: opensuse-tumbleweed |
| 839 |
#| msgid "" |
| 840 |
#| "Programmers would naturally expect by induction that I<\\%realloc(p," |
| 841 |
#| "\\~size)> is consistent with I<free(p)> and I<malloc(size)>, as that is " |
| 842 |
#| "the behavior in the general case. This is not explicitly required by " |
| 843 |
#| "POSIX.1-2024 or C11, but all conforming implementations are consistent " |
| 844 |
#| "with that." |
| 845 |
msgid "" |
| 846 |
"Programmers would naturally expect by induction that I<\\%realloc(p,\\ " |
| 847 |
"size)> is consistent with I<free(p)> and I<malloc(size)>, as that is the " |
| 848 |
"behavior in the general case. This is not explicitly required by " |
| 849 |
"POSIX.1-2024 or C11, but all conforming implementations are consistent with " |
| 850 |
"that." |
| 851 |
msgstr "" |
| 852 |
"سيتوقع المبرمجون طبيعيًا بالاستقراء أن I<\\%realloc(p,\\ size)> متسق مع " |
| 853 |
"I<free(p)> و I<malloc(size)>، حيث أن هذا هو السلوك في الحالة العامة. هذا " |
| 854 |
"غير مطلوب صراحةً بواسطة POSIX.1-2024 أو C11، لكن جميع التطبيقات المطابقة " |
| 855 |
"متسقة مع ذلك." |
| 856 |
|
| 857 |
#. type: Plain text |
| 858 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 859 |
#: opensuse-tumbleweed |
| 860 |
#| msgid "" |
| 861 |
#| "The glibc implementation of B<realloc>() is not consistent with that, " |
| 862 |
#| "and as a consequence, it is dangerous to call I<\\%realloc(p,\\~0)> in " |
| 863 |
#| "glibc." |
| 864 |
msgid "" |
| 865 |
"The glibc implementation of B<realloc>() is not consistent with that, and " |
| 866 |
"as a consequence, it is dangerous to call I<\\%realloc(p,\\ 0)> in glibc." |
| 867 |
msgstr "" |
| 868 |
"تطبيق glibc للدالة B<realloc>() غير متسق مع ذلك، وكنتيجة لذلك، من الخطر " |
| 869 |
"استدعاء I<\\%realloc(p,\\ 0)> في glibc." |
| 870 |
|
| 871 |
#. type: Plain text |
| 872 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 873 |
#: opensuse-tumbleweed |
| 874 |
#| msgid "" |
| 875 |
#| "A trivial workaround for glibc is calling it as I<\\%realloc(p,\\~size?" |
| 876 |
#| "size:1)>." |
| 877 |
msgid "" |
| 878 |
"A trivial workaround for glibc is calling it as I<\\%realloc(p,\\ size?" |
| 879 |
"size:1)>." |
| 880 |
msgstr "حل بديل تافه لـ glibc هو استدعاؤها كـ I<\\%realloc(p,\\ size?size:1)>." |
| 881 |
|
| 882 |
#. type: Plain text |
| 883 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 884 |
#: opensuse-tumbleweed |
| 885 |
#| msgid "" |
| 886 |
#| "The workaround for B<reallocarray>() in glibc \\[em]which shares the " |
| 887 |
#| "same bug\\[em] would be I<\\%reallocarray(p,\\~n?n:1,\\~size?size:1)>." |
| 888 |
msgid "" |
| 889 |
"The workaround for B<reallocarray>() in glibc \\[em]which shares the same " |
| 890 |
"bug\\[em] would be I<\\%reallocarray(p,\\ n?n:1,\\ size?size:1)>." |
| 891 |
msgstr "" |
| 892 |
"الحل البديل للدالة B<reallocarray>() في glibc \\[em]التي تشارك نفس " |
| 893 |
"الخلل\\[em] سيكون I<\\%reallocarray(p,\\ n?n:1,\\ size?size:1)>." |
| 894 |
|
| 895 |
#. type: SH |
| 896 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 897 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 898 |
#, no-wrap |
| 899 |
msgid "EXAMPLES" |
| 900 |
msgstr "أمثلة" |
| 901 |
|
| 902 |
#. type: Plain text |
| 903 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 904 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 905 |
#, no-wrap |
| 906 |
msgid "" |
| 907 |
"#include E<lt>err.hE<gt>\n" |
| 908 |
"#include E<lt>stddef.hE<gt>\n" |
| 909 |
"#include E<lt>stdio.hE<gt>\n" |
| 910 |
"#include E<lt>stdlib.hE<gt>\n" |
| 911 |
"#include E<lt>string.hE<gt>\n" |
| 912 |
"\\&\n" |
| 913 |
"#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" |
| 914 |
"#define MALLOC(type) MALLOCARRAY(1, type)\n" |
| 915 |
"\\&\n" |
| 916 |
"static inline void *my_mallocarray(size_t n, size_t size);\n" |
| 917 |
"\\&\n" |
| 918 |
"int\n" |
| 919 |
"main(void)\n" |
| 920 |
"{\n" |
| 921 |
" char *p;\n" |
| 922 |
"\\&\n" |
| 923 |
" p = MALLOCARRAY(32, char);\n" |
| 924 |
" if (p == NULL)\n" |
| 925 |
" err(EXIT_FAILURE, \"malloc\");\n" |
| 926 |
"\\&\n" |
| 927 |
" strlcpy(p, \"foo\", 32);\n" |
| 928 |
" puts(p);\n" |
| 929 |
"}\n" |
| 930 |
"\\&\n" |
| 931 |
"static inline void *\n" |
| 932 |
"my_mallocarray(size_t n, size_t size)\n" |
| 933 |
"{\n" |
| 934 |
" return reallocarray(NULL, n, size);\n" |
| 935 |
"}\n" |
| 936 |
msgstr "" |
| 937 |
"#include E<lt>err.hE<gt>\n" |
| 938 |
"#include E<lt>stddef.hE<gt>\n" |
| 939 |
"#include E<lt>stdio.hE<gt>\n" |
| 940 |
"#include E<lt>stdlib.hE<gt>\n" |
| 941 |
"#include E<lt>string.hE<gt>\n" |
| 942 |
"\\&\n" |
| 943 |
"#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" |
| 944 |
"#define MALLOC(type) MALLOCARRAY(1, type)\n" |
| 945 |
"\\&\n" |
| 946 |
"static inline void *my_mallocarray(size_t n, size_t size);\n" |
| 947 |
"\\&\n" |
| 948 |
"int\n" |
| 949 |
"main(void)\n" |
| 950 |
"{\n" |
| 951 |
" char *p;\n" |
| 952 |
"\\&\n" |
| 953 |
" p = MALLOCARRAY(32, char);\n" |
| 954 |
" if (p == NULL)\n" |
| 955 |
" err(EXIT_FAILURE, \"malloc\");\n" |
| 956 |
"\\&\n" |
| 957 |
" strlcpy(p, \"foo\", 32);\n" |
| 958 |
" puts(p);\n" |
| 959 |
"}\n" |
| 960 |
"\\&\n" |
| 961 |
"static inline void *\n" |
| 962 |
"my_mallocarray(size_t n, size_t size)\n" |
| 963 |
"{\n" |
| 964 |
" return reallocarray(NULL, n, size);\n" |
| 965 |
"}\n" |
| 966 |
|
| 967 |
#. type: SH |
| 968 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 969 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 970 |
#, no-wrap |
| 971 |
msgid "SEE ALSO" |
| 972 |
msgstr "انظر أيضًا" |
| 973 |
|
| 974 |
#. type: Plain text |
| 975 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 976 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 977 |
msgid "" |
| 978 |
"B<valgrind>(1), B<brk>(2), B<mmap>(2), B<alloca>(3), B<malloc_get_state>(3), " |
| 979 |
"B<malloc_info>(3), B<malloc_trim>(3), B<malloc_usable_size>(3), " |
| 980 |
"B<mallopt>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)" |
| 981 |
msgstr "" |
| 982 |
"B<valgrind>(1), B<brk>(2), B<mmap>(2), B<alloca>(3), B<malloc_get_state>(3), " |
| 983 |
"B<malloc_info>(3), B<malloc_trim>(3), B<malloc_usable_size>(3), " |
| 984 |
"B<mallopt>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)" |
| 985 |
|
| 986 |
#. type: Plain text |
| 987 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 988 |
#: opensuse-tumbleweed |
| 989 |
msgid "" |
| 990 |
"For details of the GNU C library implementation, see E<.UR https:\\://" |
| 991 |
"sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" |
| 992 |
msgstr "" |
| 993 |
"لتفاصيل تنفيذ مكتبة سي لجنو، انظر E<.UR https:\\//sourceware.org/glibc/wiki/" |
| 994 |
"MallocInternals> E<.UE .>" |
| 995 |
|
| 996 |
#. type: TH |
| 997 |
#: debian-trixie |
| 998 |
#, no-wrap |
| 999 |
msgid "2024-05-02" |
| 1000 |
msgstr "2 مايو 2024" |
| 1001 |
|
| 1002 |
#. type: TH |
| 1003 |
#: debian-trixie |
| 1004 |
#, no-wrap |
| 1005 |
msgid "Linux man-pages 6.9.1" |
| 1006 |
msgstr "صفحات دليل لينكس 6.9.1" |
| 1007 |
|
| 1008 |
#. type: Plain text |
| 1009 |
#: debian-trixie |
| 1010 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 1011 |
msgstr "مكتبة سي المعيارية (I<libc>، I<-lc>)" |
| 1012 |
|
| 1013 |
#. type: Plain text |
| 1014 |
#: debian-trixie |
| 1015 |
#, no-wrap |
| 1016 |
msgid "" |
| 1017 |
"B<void *malloc(size_t >I<size>B<);>\n" |
| 1018 |
"B<void free(void *_Nullable >I<ptr>B<);>\n" |
| 1019 |
"B<void *calloc(size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 1020 |
"B<void *realloc(void *_Nullable >I<ptr>B<, size_t >I<size>B<);>\n" |
| 1021 |
"B<void *reallocarray(void *_Nullable >I<ptr>B<, size_t >I<nmemb>B<, size_t " |
| 1022 |
">I<size>B<);>\n" |
| 1023 |
msgstr "" |
| 1024 |
"B<void *malloc(size_t >I<size>B<);>\n" |
| 1025 |
"B<void free(void *_Nullable >I<ptr>B<);>\n" |
| 1026 |
"B<void *calloc(size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 1027 |
"B<void *realloc(void *_Nullable >I<ptr>B<, size_t >I<size>B<);>\n" |
| 1028 |
"B<void *reallocarray(void *_Nullable >I<ptr>B<, size_t >I<nmemb>B<, size_t " |
| 1029 |
">I<size>B<);>\n" |
| 1030 |
|
| 1031 |
#. type: Plain text |
| 1032 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1033 |
msgid "" |
| 1034 |
"The B<free>() function frees the memory space pointed to by I<ptr>, which " |
| 1035 |
"must have been returned by a previous call to B<malloc>() or related " |
| 1036 |
"functions. Otherwise, or if I<ptr> has already been freed, undefined " |
| 1037 |
"behavior occurs. If I<ptr> is NULL, no operation is performed." |
| 1038 |
msgstr "" |
| 1039 |
"الدالة B<free>() تُحرر مساحة الذاكرة المُشار إليها بواسطة I<ptr>، والتي يجب" |
| 1040 |
" أن " |
| 1041 |
"تكون قد أُعيدت بواسطة استدعاء سابق لـ B<malloc>() أو دوال ذات صلة. وإلا، أو " |
| 1042 |
"إذا كان I<ptr> قد حُرر بالفعل، يحدث سلوك غير مُحدد. إذا كان I<ptr> هو NULL،" |
| 1043 |
" لا " |
| 1044 |
"يُنفذ أي عملية." |
| 1045 |
|
| 1046 |
#. type: Plain text |
| 1047 |
#: debian-trixie |
| 1048 |
msgid "" |
| 1049 |
"The B<calloc>() function allocates memory for an array of I<nmemb> elements " |
| 1050 |
"of I<size> bytes each and returns a pointer to the allocated memory. The " |
| 1051 |
"memory is set to zero. If I<nmemb> or I<size> is 0, then B<calloc>() " |
| 1052 |
"returns a unique pointer value that can later be successfully passed to " |
| 1053 |
"B<free>()." |
| 1054 |
msgstr "" |
| 1055 |
"الدالة B<calloc>() تُخصص ذاكرة لمصفوفة من I<nmemb> عنصرًا، كل منها بحجم " |
| 1056 |
"I<size> بايت، وتُعيد مؤشرًا إلى الذاكرة المُخصصة. تُضبط الذاكرة إلى الصفر." |
| 1057 |
" إذا " |
| 1058 |
"كان I<nmemb> أو I<size> يساوي 0، فإن B<calloc>() تُعيد قيمة مؤشر فريدة يمكن " |
| 1059 |
"تمريرها لاحقًا بنجاح إلى B<free>()." |
| 1060 |
|
| 1061 |
#. type: Plain text |
| 1062 |
#: debian-trixie |
| 1063 |
msgid "" |
| 1064 |
"If the multiplication of I<nmemb> and I<size> would result in integer " |
| 1065 |
"overflow, then B<calloc>() returns an error. By contrast, an integer " |
| 1066 |
"overflow would not be detected in the following call to B<malloc>(), with " |
| 1067 |
"the result that an incorrectly sized block of memory would be allocated:" |
| 1068 |
msgstr "" |
| 1069 |
"إذا أدى ضرب I<nmemb> و I<size> إلى تجاوز عدد صحيح، فإن B<calloc>() تُعيد خطأ. " |
| 1070 |
"على النقيض، لا يُكتشف تجاوز عدد صحيح في الاستدعاء التالي لـ B<malloc>()، مما " |
| 1071 |
"يؤدي إلى تخصيص كتلة ذاكرة بحجم غير صحيح:" |
| 1072 |
|
| 1073 |
#. type: Plain text |
| 1074 |
#: debian-trixie |
| 1075 |
#, no-wrap |
| 1076 |
msgid "malloc(nmemb * size);\n" |
| 1077 |
msgstr "malloc(nmemb * size);\n" |
| 1078 |
|
| 1079 |
#. type: Plain text |
| 1080 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1081 |
msgid "" |
| 1082 |
"The B<realloc>() function changes the size of the memory block pointed to " |
| 1083 |
"by I<ptr> to I<size> bytes. The contents of the memory will be unchanged in " |
| 1084 |
"the range from the start of the region up to the minimum of the old and new " |
| 1085 |
"sizes. If the new size is larger than the old size, the added memory will " |
| 1086 |
"I<not> be initialized." |
| 1087 |
msgstr "" |
| 1088 |
"الدالة B<realloc>() تُغير حجم كتلة الذاكرة المُشار إليها بواسطة I<ptr> إلى " |
| 1089 |
"I<size> بايت. تبقى محتويات الذاكرة دون تغيير في النطاق من بداية المنطقة حتى " |
| 1090 |
"الحد الأدنى للحجمين القديم والجديد. إذا كان الحجم الجديد أكبر من الحجم " |
| 1091 |
"القديم، فإن الذاكرة المُضافة I<لا> تُهيأ." |
| 1092 |
|
| 1093 |
#. type: Plain text |
| 1094 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1095 |
msgid "" |
| 1096 |
"If I<ptr> is NULL, then the call is equivalent to I<malloc(size)>, for all " |
| 1097 |
"values of I<size>." |
| 1098 |
msgstr "" |
| 1099 |
"إذا كان I<ptr> هو NULL، فإن الاستدعاء يُعادل I<malloc(size)>، لجميع قيم " |
| 1100 |
"I<size>." |
| 1101 |
|
| 1102 |
#. type: Plain text |
| 1103 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1104 |
msgid "" |
| 1105 |
"If I<size> is equal to zero, and I<ptr> is not NULL, then the call is " |
| 1106 |
"equivalent to I<free(ptr)> (but see \"Nonportable behavior\" for portability " |
| 1107 |
"issues)." |
| 1108 |
msgstr "" |
| 1109 |
"إذا كان I<size> يساوي صفرًا، و I<ptr> ليس NULL، فإن الاستدعاء يُعادل " |
| 1110 |
"I<free(ptr)> (ولكن انظر \"سلوك غير محمول\" لمشكلات قابلية النقل)." |
| 1111 |
|
| 1112 |
#. type: Plain text |
| 1113 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1114 |
msgid "" |
| 1115 |
"Unless I<ptr> is NULL, it must have been returned by an earlier call to " |
| 1116 |
"B<malloc> or related functions. If the area pointed to was moved, a " |
| 1117 |
"I<free(ptr)> is done." |
| 1118 |
msgstr "" |
| 1119 |
"ما لم يكن I<ptr> هو NULL، يجب أن يكون قد أُعيد بواسطة استدعاء سابق لـ " |
| 1120 |
"B<malloc> أو دوال ذات صلة. إذا نُقلت المنطقة المُشار إليها، يُنفذ I<free(ptr)" |
| 1121 |
">." |
| 1122 |
|
| 1123 |
#. type: Plain text |
| 1124 |
#: debian-trixie |
| 1125 |
msgid "" |
| 1126 |
"The B<reallocarray>() function changes the size of (and possibly moves) " |
| 1127 |
"the memory block pointed to by I<ptr> to be large enough for an array of " |
| 1128 |
"I<nmemb> elements, each of which is I<size> bytes. It is equivalent to the " |
| 1129 |
"call" |
| 1130 |
msgstr "" |
| 1131 |
"الدالة B<reallocarray>() تُغير حجم (وربما تنقل) كتلة الذاكرة المُشار إليها " |
| 1132 |
"بواسطة I<ptr> لتكون كبيرة بما يكفي لمصفوفة من I<nmemb> عنصرًا، كل منها بحجم " |
| 1133 |
"I<size> بايت. تُعادل الاستدعاء" |
| 1134 |
|
| 1135 |
#. type: Plain text |
| 1136 |
#: debian-trixie |
| 1137 |
#, no-wrap |
| 1138 |
msgid "realloc(ptr, nmemb * size);\n" |
| 1139 |
msgstr "realloc(ptr, nmemb * size);\n" |
| 1140 |
|
| 1141 |
#. type: Plain text |
| 1142 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1143 |
msgid "" |
| 1144 |
"The B<realloc>() and B<reallocarray>() functions return NULL if I<ptr> is " |
| 1145 |
"not NULL and the requested size is zero; this is not considered an error. " |
| 1146 |
"(See \"Nonportable behavior\" for portability issues.) Otherwise, the " |
| 1147 |
"returned pointer may be the same as I<ptr> if the allocation was not moved " |
| 1148 |
"(e.g., there was room to expand the allocation in-place), or different from " |
| 1149 |
"I<ptr> if the allocation was moved to a new address. If these functions " |
| 1150 |
"fail, the original block is left untouched; it is not freed or moved." |
| 1151 |
msgstr "" |
| 1152 |
"الدالتان B<realloc>() و B<reallocarray>() تُعيدان NULL إذا كان I<ptr> ليس " |
| 1153 |
"NULL والحجم المطلوب هو صفر؛ لا يُعتبر هذا خطأ. (انظر \"سلوك غير محمول\" " |
| 1154 |
"لمشكلات قابلية النقل.) وإلا، قد يكون المؤشر المُعاد هو نفسه I<ptr> إذا لم " |
| 1155 |
"يُنقل التخصيص (مثلًا، وُجدت مساحة لتوسيع التخصيص في مكانه)، أو مختلفًا عن I<" |
| 1156 |
"ptr> " |
| 1157 |
"إذا نُقل التخصيص إلى عنوان جديد. إذا فشلت هذه الدوال، تُترك الكتلة الأصلية" |
| 1158 |
" دون " |
| 1159 |
"تغيير؛ لا تُحرر ولا تُنقل." |
| 1160 |
|
| 1161 |
#. type: Plain text |
| 1162 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1163 |
msgid "C11, POSIX.1-2008." |
| 1164 |
msgstr "C11, POSIX.1-2008." |
| 1165 |
|
| 1166 |
#. type: Plain text |
| 1167 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1168 |
msgid "None." |
| 1169 |
msgstr "لا شيء." |
| 1170 |
|
| 1171 |
#. type: Plain text |
| 1172 |
#: debian-trixie |
| 1173 |
#, no-wrap |
| 1174 |
msgid "" |
| 1175 |
"#include E<lt>err.hE<gt>\n" |
| 1176 |
"#include E<lt>stddef.hE<gt>\n" |
| 1177 |
"#include E<lt>stdio.hE<gt>\n" |
| 1178 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1179 |
"#include E<lt>string.hE<gt>\n" |
| 1180 |
"\\&\n" |
| 1181 |
"#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" |
| 1182 |
"#define MALLOC(type) MALLOCARRAY(1, type)\n" |
| 1183 |
"\\&\n" |
| 1184 |
"static inline void *my_mallocarray(size_t nmemb, size_t size);\n" |
| 1185 |
"\\&\n" |
| 1186 |
"int\n" |
| 1187 |
"main(void)\n" |
| 1188 |
"{\n" |
| 1189 |
" char *p;\n" |
| 1190 |
"\\&\n" |
| 1191 |
" p = MALLOCARRAY(32, char);\n" |
| 1192 |
" if (p == NULL)\n" |
| 1193 |
" err(EXIT_FAILURE, \"malloc\");\n" |
| 1194 |
"\\&\n" |
| 1195 |
" strlcpy(p, \"foo\", 32);\n" |
| 1196 |
" puts(p);\n" |
| 1197 |
"}\n" |
| 1198 |
"\\&\n" |
| 1199 |
"static inline void *\n" |
| 1200 |
"my_mallocarray(size_t nmemb, size_t size)\n" |
| 1201 |
"{\n" |
| 1202 |
" return reallocarray(NULL, nmemb, size);\n" |
| 1203 |
"}\n" |
| 1204 |
msgstr "" |
| 1205 |
"#include E<lt>err.hE<gt>\n" |
| 1206 |
"#include E<lt>stddef.hE<gt>\n" |
| 1207 |
"#include E<lt>stdio.hE<gt>\n" |
| 1208 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1209 |
"#include E<lt>string.hE<gt>\n" |
| 1210 |
"\\&\n" |
| 1211 |
"#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" |
| 1212 |
"#define MALLOC(type) MALLOCARRAY(1, type)\n" |
| 1213 |
"\\&\n" |
| 1214 |
"static inline void *my_mallocarray(size_t nmemb, size_t size);\n" |
| 1215 |
"\\&\n" |
| 1216 |
"int\n" |
| 1217 |
"main(void)\n" |
| 1218 |
"{\n" |
| 1219 |
" char *p;\n" |
| 1220 |
"\\&\n" |
| 1221 |
" p = MALLOCARRAY(32, char);\n" |
| 1222 |
" if (p == NULL)\n" |
| 1223 |
" err(EXIT_FAILURE, \"malloc\");\n" |
| 1224 |
"\\&\n" |
| 1225 |
" strlcpy(p, \"foo\", 32);\n" |
| 1226 |
" puts(p);\n" |
| 1227 |
"}\n" |
| 1228 |
"\\&\n" |
| 1229 |
"static inline void *\n" |
| 1230 |
"my_mallocarray(size_t nmemb, size_t size)\n" |
| 1231 |
"{\n" |
| 1232 |
" return reallocarray(NULL, nmemb, size);\n" |
| 1233 |
"}\n" |
| 1234 |
|
| 1235 |
#. type: Plain text |
| 1236 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1237 |
msgid "" |
| 1238 |
"For details of the GNU C library implementation, see E<.UR https://" |
| 1239 |
"sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" |
| 1240 |
msgstr "" |
| 1241 |
"لتفاصيل تنفيذ مكتبة سي لجنو، انظر E<.UR https://sourceware.org/glibc/wiki/" |
| 1242 |
"MallocInternals> E<.UE .>" |
| 1243 |
|
| 1244 |
#. type: TH |
| 1245 |
#: fedora-44 fedora-rawhide |
| 1246 |
#, no-wrap |
| 1247 |
msgid "2024-11-17" |
| 1248 |
msgstr "17 نوفمبر 2024" |
| 1249 |
|
| 1250 |
#. type: TH |
| 1251 |
#: fedora-44 fedora-rawhide |
| 1252 |
#, no-wrap |
| 1253 |
msgid "Linux man-pages 6.13" |
| 1254 |
msgstr "صفحات دليل لينكس 6.13" |
| 1255 |
|
| 1256 |
#. type: Plain text |
| 1257 |
#: fedora-44 fedora-rawhide |
| 1258 |
#, no-wrap |
| 1259 |
msgid "" |
| 1260 |
"B<void *malloc(size_t >I<size>B<);>\n" |
| 1261 |
"B<void free(void *_Nullable >I<ptr>B<);>\n" |
| 1262 |
"B<void *calloc(size_t >I<n>B<, size_t >I<size>B<);>\n" |
| 1263 |
"B<void *realloc(void *_Nullable >I<ptr>B<, size_t >I<size>B<);>\n" |
| 1264 |
"B<void *reallocarray(void *_Nullable >I<ptr>B<, size_t >I<n>B<, size_t >I<" |
| 1265 |
"size>B<);>\n" |
| 1266 |
msgstr "" |
| 1267 |
"B<void *malloc(size_t >I<size>B<);>\n" |
| 1268 |
"B<void free(void *_Nullable >I<ptr>B<);>\n" |
| 1269 |
"B<void *calloc(size_t >I<n>B<, size_t >I<size>B<);>\n" |
| 1270 |
"B<void *realloc(void *_Nullable >I<ptr>B<, size_t >I<size>B<);>\n" |
| 1271 |
"B<void *reallocarray(void *_Nullable >I<ptr>B<, size_t >I<n>B<, size_t >I<" |
| 1272 |
"size>B<);>\n" |
| 1273 |
|
| 1274 |
#. type: Plain text |
| 1275 |
#: fedora-44 fedora-rawhide |
| 1276 |
msgid "" |
| 1277 |
"The B<reallocarray>() function changes the size of (and possibly moves) " |
| 1278 |
"the memory block pointed to by I<ptr> to be large enough for an array of " |
| 1279 |
"I<n> elements, each of which is I<size> bytes. It is equivalent to the call" |
| 1280 |
msgstr "" |
| 1281 |
"الدالة B<reallocarray>() تُغير حجم (وربما تنقل) كتلة الذاكرة المُشار إليها " |
| 1282 |
"بواسطة I<ptr> لتكون كبيرة بما يكفي لمصفوفة من I<n> عنصرًا، كل منها بحجم " |
| 1283 |
"I<size> بايت. تُعادل الاستدعاء" |
| 1284 |
|
| 1285 |
#. type: Plain text |
| 1286 |
#: fedora-44 fedora-rawhide |
| 1287 |
#, no-wrap |
| 1288 |
msgid "realloc(ptr, n * size);\n" |
| 1289 |
msgstr "realloc(ptr, n * size);\n" |
| 1290 |
|
| 1291 |
#. type: TH |
| 1292 |
#: mageia-cauldron |
| 1293 |
#, no-wrap |
| 1294 |
msgid "Linux man-pages 6.17" |
| 1295 |
msgstr "صفحات دليل لينكس 6.17" |
| 1296 |
|
| 1297 |
#. type: TH |
| 1298 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1299 |
#, no-wrap |
| 1300 |
msgid "Linux man-pages (unreleased)" |
| 1301 |
msgstr "صفحات دليل لينكس (لم تصدر بعد)" |
| 1302 |
|