# Arabic translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # زايد السعيدي , 2026. msgid "" msgstr "" "Project-Id-Version: manpages-l10n 4.30.2\n" "POT-Creation-Date: 2026-06-05 06:30+0200\n" "PO-Revision-Date: 2026-06-06 09:02+0400\n" "Last-Translator: Zayed Al-Saidi \n" "Language-Team: Arabic \n" "Language: ar\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 &&" " n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" "X-Generator: Lokalize 23.08.5\n" #. type: TH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "malloc" msgstr "malloc" #. type: TH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "2026-02-08" msgstr "8 فبراير 2026" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.18" msgstr "صفحات دليل لينكس 6.18" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "الاسم" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "malloc, free, calloc, realloc, reallocarray - allocate and free dynamic " "memory" msgstr "" "malloc, free, calloc, realloc, reallocarray - تخصيص وتحرير الذاكرة " "الديناميكية" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "المكتبة" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "Standard C library (I,\\ I<-lc>)" msgstr "مكتبة سي المعيارية (I،\\ I<-lc>)" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "موجز" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B<#include Estdlib.hE>\n" msgstr "B<#include Estdlib.hE>\n" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "BIB<);>\n" "BI

B<);>\n" "BIB<, size_t >IB<);>\n" "BI

B<, size_t >IB<);>\n" "BI

B<, size_t >IB<, size_t >IB<);>\n" msgstr "" "BIB<);>\n" "BI

B<);>\n" "BIB<, size_t >IB<);>\n" "BI

B<, size_t >IB<);>\n" "BI

B<, size_t >IB<, size_t >IB<);>\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Feature Test Macro Requirements for glibc (see B(7)):" msgstr "" "متطلبات ماكروات اختبار الميزات لـ glibc (انظر B(7)):" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "B():" msgstr "B():" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" " Since glibc 2.29:\n" " _DEFAULT_SOURCE\n" " glibc 2.28 and earlier:\n" " _GNU_SOURCE\n" msgstr "" " منذ glibc 2.29:\n" " _DEFAULT_SOURCE\n" " glibc 2.28 وما قبله:\n" " _GNU_SOURCE\n" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "الوصف" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "malloc()" msgstr "malloc()" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() function allocates I bytes and returns a pointer to " "the allocated memory. I. If I is 0, " "then B() returns a unique pointer value that can later be " "successfully passed to B(). (See \"Nonportable behavior\" for " "portability issues.)" msgstr "" "تخصص الدالة B() I بايت وتُعيد مؤشرًا إلى الذاكرة المخصصة. " "I<الذاكرة غير مهيأة>. إذا كان I يساوي 0، تُعيد B() قيمة مؤشر " "فريدة يمكن تمريرها لاحقًا بنجاح إلى B(). (انظر \"سلوك غير محمول\" " "لمشكلات قابلية النقل.)" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "free()" msgstr "free()" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The B() function frees the memory space pointed to by I

, which " "must have been returned by a previous call to B() or related " "functions. Otherwise, or if I

has already been freed, undefined behavior " "occurs. If I

is NULL, no operation is performed." msgstr "" "تحرر الدالة B() مساحة الذاكرة المشار إليها بواسطة I

، والتي يجب أن " "تكون قد أُعيدت باستدعاء سابق لـ B() أو دوال ذات صلة. وإلا، أو إذا كان " "I

قد حُرر بالفعل، يحدث سلوك غير محدد. إذا كان I

هو NULL، لا تُجرى أي " "عملية." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "calloc()" msgstr "calloc()" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() function allocates memory for an array of I elements of " "I bytes each and returns a pointer to the allocated memory. The " "memory is set to zero. If I or I is 0, then B() returns a " "unique pointer value that can later be successfully passed to B()." msgstr "" "تخصص الدالة B() ذاكرة لمصفوفة من I عنصر، كل منها بحجم I " "بايت، وتُعيد مؤشرًا إلى الذاكرة المخصصة. تُضبط الذاكرة على الصفر. إذا كان I " "أو I يساوي 0، تُعيد B() قيمة مؤشر فريدة يمكن تمريرها لاحقًا " "بنجاح إلى B()." #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If the multiplication of I and I would result in integer overflow, " "then B() returns an error. By contrast, an integer overflow would " "not be detected in the following call to B(), with the result that " "an incorrectly sized block of memory would be allocated:" msgstr "" "إذا أدى ضرب I و I إلى تجاوز عدد صحيح، تُعيد B() خطأ. على " "النقيض، لا يُكتشف تجاوز عدد صحيح في الاستدعاء التالي لـ B()، مما يؤدي " "إلى تخصيص كتلة ذاكرة بحجم غير صحيح:" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "malloc(n * size);\n" msgstr "malloc(n * size);\n" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "realloc()" msgstr "realloc()" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The B() function changes the size of the memory block pointed to " "by I

to I bytes. The contents of the memory will be unchanged in " "the range from the start of the region up to the minimum of the old and new " "sizes. If the new size is larger than the old size, the added memory will " "I be initialized." msgstr "" "تغير الدالة B() حجم كتلة الذاكرة المشار إليها بواسطة I

إلى " "I بايت. تبقى محتويات الذاكرة دون تغيير في النطاق من بداية المنطقة حتى " "الحد الأدنى للحجمين القديم والجديد. إذا كان الحجم الجديد أكبر من الحجم " "القديم، فإن الذاكرة المضافة I<لن> تُهيأ." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "If I

is NULL, then the call is equivalent to I, for all " "values of I." msgstr "" "إذا كان I

هو NULL، فإن الاستدعاء يعادل I، لجميع قيم I." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "If I is equal to zero, and I

is not NULL, then the call is " "equivalent to I (but see \"Nonportable behavior\" for portability " "issues)." msgstr "" "إذا كان I يساوي صفرًا، و I

ليس NULL، فإن الاستدعاء يعادل I " "(ولكن انظر \"سلوك غير محمول\" لمشكلات قابلية النقل)." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "Unless I

is NULL, it must have been returned by an earlier call to " "B or related functions. If the area pointed to was moved, a " "I is done." msgstr "" "ما لم يكن I

هو NULL، يجب أن يكون قد أُعيد باستدعاء سابق لـ B أو " "دوال ذات صلة. إذا نُقلت المنطقة المشار إليها، تُجرى I." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "reallocarray()" msgstr "reallocarray()" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The B() function changes the size of (and possibly moves) " "the memory block pointed to by I

to be large enough for an array of I " "elements, each of which is I bytes. It is equivalent to the call" msgstr "" "تغير الدالة B() حجم (وربما تنقل) كتلة الذاكرة المشار إليها " "بواسطة I

لتكون كبيرة بما يكفي لمصفوفة من I عنصر، كل منها بحجم I " "بايت. وهي تعادل الاستدعاء" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "realloc(p, n * size);\n" msgstr "realloc(p, n * size);\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "However, unlike that B() call, B() fails safely in " "the case where the multiplication would overflow. If such an overflow " "occurs, B() returns an error." msgstr "" "لكن، على عكس استدعاء B() ذلك، تفشل B() بأمان في " "حالة حدوث فائض في الضرب. إذا حدث مثل هذا الفائض، تُرجع B() خطأ." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "RETURN VALUE" msgstr "قيمة الإرجاع" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B(), B(), B(), and B() functions " "return a pointer to the allocated memory, which is suitably aligned for any " "type that fits into the requested size or less. On error, these functions " "return NULL and set I. Attempting to allocate more than " "B bytes is considered an error, as an object that large could " "cause later pointer subtraction to overflow." msgstr "" "تُرجع دوال B() وB() وB() وB() مؤشرًا " "إلى الذاكرة المُخصصة، وهي مُحاذاة بشكل مناسب لأي نوع يناسب الحجم المطلوب أو " "أقل. عند حدوث خطأ، تُرجع هذه الدوال NULL وتُعيِّن I. تُعد محاولة تخصيص " "أكثر من B بايت خطأ، لأن كائنًا بهذا الحجم قد يُسبب فائضًا في طرح " "المؤشرات لاحقًا." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "The B() function returns no value, and preserves I." msgstr "لا تُرجع دالة B() أي قيمة، وتحافظ على I." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The B() and B() functions return NULL if I

is " "not NULL and the requested size is zero; this is not considered an error. " "(See \"Nonportable behavior\" for portability issues.) Otherwise, the " "returned pointer may be the same as I

if the allocation was not moved (e." "g., there was room to expand the allocation in-place), or different from " "I

if the allocation was moved to a new address. If these functions fail, " "the original block is left untouched; it is not freed or moved." msgstr "" "تُرجع دالتا B() وB() NULL إذا كان I

ليس NULL وكان " "الحجم المطلوب صفرًا؛ لا يُعتبر هذا خطأ. (انظر \"سلوك غير محمول\" لمشكلات " "قابلية النقل.) خلاف ذلك، قد يكون المؤشر المُعاد هو نفسه I

إذا لم يُنقل " "التخصيص (مثلًا، وُجدت مساحة لتوسيع التخصيص في مكانه)، أو مختلفًا عن I

إذا " "نُقل التخصيص إلى عنوان جديد. إذا فشلت هاتان الدالتان، تُترك الكتلة الأصلية" " دون " "تغيير؛ لا تُحرر ولا تُنقل." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ERRORS" msgstr "الأخطاء" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B(), B(), B(), and B() can fail with " "the following error:" msgstr "" "يمكن أن تفشل دوال B() وB() وB() وB() " "مع الخطأ التالي:" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Out of memory. Possibly, the application hit the B or " "B limit described in B(2). Another reason could be " "that the number of mappings created by the caller process exceeded the limit " "specified by I." msgstr "" "نفاد الذاكرة. ربما بلغ التطبيق حد B أو B الموصوف في " "B(2). قد يكون سبب آخر هو أن عدد التعيينات التي أنشأتها عملية " "المُستدعي تجاوز الحد المُحدد بواسطة I." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ATTRIBUTES" msgstr "السمات" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "For an explanation of the terms used in this section, see B(7)." msgstr "" "للاطلاع على شرح للمصطلحات المستخدمة في هذا القسم، انظر B(7)." #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Interface" msgstr "الواجهة" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Attribute" msgstr "السمة" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Value" msgstr "القيمة" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".na\n" msgstr ".na\n" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".nh\n" msgstr ".nh\n" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "B(),\n" "B(),\n" "B(),\n" "B()" msgstr "" "B(),\n" "B(),\n" "B(),\n" "B()" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Thread safety" msgstr "سلامة الخيوط" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "MT-Safe" msgstr "MT-Safe" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "المعايير" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: TQ #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: TQ #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: TQ #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "C23, POSIX.1-2024." msgstr "C23، ‏POSIX.1-2024." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "POSIX.1-2024." msgstr "POSIX.1-2024." #. type: SS #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "realloc(p, 0)" msgstr "realloc(p, 0)" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #| msgid "" #| "The behavior of I in glibc doesn't conform to any of " #| "C99, C11, POSIX.1-2001, POSIX.1-2004, POSIX.1-2008, POSIX.1-2013, " #| "POSIX.1-2017, or POSIX.1-2024. The C17 specification was changed to make " #| "it conforming, but that specification made it impossible to write code " #| "that reliably determines if the input pointer is freed after I, and C23 changed it again to make this undefined behavior, " #| "acknowledging that the C17 specification was broad enough, so that " #| "undefined behavior wasn't worse than that." msgid "" "The behavior of I in glibc doesn't conform to any of C99, " "C11, POSIX.1-2001, POSIX.1-2004, POSIX.1-2008, POSIX.1-2013, POSIX.1-2017, " "or POSIX.1-2024. The C17 specification was changed to make it conforming, " "but that specification made it impossible to write code that reliably " "determines if the input pointer is freed after I, and C23 " "changed it again to make this undefined behavior, acknowledging that the C17 " "specification was broad enough, so that undefined behavior wasn't worse than " "that." msgstr "" "لا يتوافق سلوك I في glibc مع أي من C99 أو C11 أو " "POSIX.1-2001 أو POSIX.1-2004 أو POSIX.1-2008 أو POSIX.1-2013 أو POSIX.1-2017 " "أو POSIX.1-2024. غُيّرت مواصفات C17 لجعلها متوافقة، لكن تلك المواصفات جعلت من " "المستحيل كتابة كود يُحدد بشكل موثوق ما إذا كان المؤشر المُدخل قد حُرر بعد " "I، وغيّرتها C23 مرة أخرى لجعل هذا سلوكًا غير مُحدد، معترفةً" " بأن " "مواصفات C17 كانت واسعة بما يكفي، بحيث لم يكن السلوك غير المُحدد أسوأ من ذلك." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "B() suffers the same issues in glibc." msgstr "تعاني B() من نفس المشكلات في glibc." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "musl libc and the BSDs conform to all versions of ISO C and POSIX.1." msgstr "تتوافق musl libc و BSDs مع جميع إصدارات ISO C و POSIX.1." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "gnulib provides the I module, which provides wrappers " "B() and B() that conform to all versions of ISO C " "and POSIX.1." msgstr "" "يوفر gnulib الوحدة I، التي تُوفر غلافات B() " "وB() تتوافق مع جميع إصدارات ISO C و POSIX.1." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "There's a proposal to standardize the BSD behavior: E<.UR https:\\://www." "open-std.org/\\:jtc1/\\:sc22/\\:wg14/\\:www/\\:docs/\\:n3621.txt> E<.UE .>" msgstr "" "هناك اقتراح لتوحيد سلوك BSD: E<.UR https:\\://www.open-std.org/\\:jtc1/\\:" "sc22/\\:wg14/\\:www/\\:docs/\\:n3621.txt> E<.UE .>" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "التاريخ" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "POSIX.1-2001, C89." msgstr "POSIX.1-2001، C89." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "glibc 2.26. OpenBSD 5.6, FreeBSD 11.0." msgstr "glibc 2.26. OpenBSD 5.6, FreeBSD 11.0." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B() and related functions rejected sizes greater than " "B starting in glibc 2.30." msgstr "" "رفضت B() والدوال ذات الصلة الأحجام الأكبر من B بدءًا من " "glibc 2.30." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "B() preserved I starting in glibc 2.33." msgstr "الدالة B() تحافظ على I ابتداءً من glibc 2.33." #. type: SS #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap #| msgid "realloc(p, 0)" msgid "realloc(p,\\ 0)" msgstr "realloc(p,\\ 0)" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #| msgid "" #| "C89 was ambiguous in its specification of I. C99 " #| "partially fixed this." msgid "" "C89 was ambiguous in its specification of I. C99 partially " "fixed this." msgstr "كانت مواصفات C89 غامضة بخصوص I. صحّح C99 هذا جزئيًا." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The original implementation in glibc would have been conforming to C99. " "However, and ironically, trying to comply with C99 before the standard was " "released, glibc changed its behavior in glibc 2.1.1 into something that " "ended up not conforming to the final C99 specification (but this is debated, " "as the wording of the standard seems self-contradicting)." msgstr "" "كان التنفيذ الأصلي في glibc متوافقًا مع C99. لكن، ومن المفارقات، أن محاولة " "الامتثال لـ C99 قبل إصدار المعيار، غيّرت glibc سلوكها في glibc 2.1.1 إلى شيء " "لم ينتهِ به المطاف متوافقًا مع مواصفات C99 النهائية (لكن هذا محل جدل، إذ تبدو " "صياغة المعيار متناقضة مع ذاتها)." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "NOTES" msgstr "ملاحظات" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "By default, Linux follows an optimistic memory allocation strategy. This " "means that when B() returns non-NULL there is no guarantee that the " "memory really is available. In case it turns out that the system is out of " "memory, one or more processes will be killed by the OOM killer. For more " "information, see the description of I and I in B(5), and the Linux kernel source file " "I." msgstr "" "مبدئيًا، يتبع لينكس استراتيجية تفاؤلية لتخصيص الذاكرة. هذا يعني أنه عندما " "تُرجع B() قيمة غير NULL، فلا يوجد ضمان بأن الذاكرة متاحة فعلًا. في" " حال " "اتضح أن النظام قد نفدت ذاكرته، فسيُقتل عملية أو أكثر بواسطة قاتل OOM. لمزيد " "من المعلومات، انظر وصف I و I في B(5)، وملف مصدر نواة لينكس I." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Normally, B() allocates memory from the heap, and adjusts the size " "of the heap as required, using B(2). When allocating blocks of memory " "larger than B bytes, the glibc B() implementation " "allocates the memory as a private anonymous mapping using B(2). " "B is 128\\ kB by default, but is adjustable using " "B(3). Prior to Linux 4.7 allocations performed using B(2) " "were unaffected by the B resource limit; since Linux 4.7, this " "limit is also enforced for allocations performed using B(2)." msgstr "" "عادةً، تخصص B() الذاكرة من الكومة، وتضبط حجم الكومة حسب الحاجة، " "باستخدام B(2). عند تخصيص كتل ذاكرة أكبر من B بايت، " "ينفذ تنفيذ glibc لـ B() تخصيص الذاكرة كتعيين مجهول خاص باستخدام " "B(2). قيمة B هي 128 كيلوبايت مبدئيًا، لكنها قابلة للضبط " "باستخدام B(3). قبل لينكس 4.7، لم تتأثر التخصيصات المنفذة باستخدام " "B(2) بحد المورد B؛ منذ لينكس 4.7، يُطبّق هذا الحد أيضًا" " على " "التخصيصات المنفذة باستخدام B(2)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "To avoid corruption in multithreaded applications, mutexes are used " "internally to protect the memory-management data structures employed by " "these functions. In a multithreaded application in which threads " "simultaneously allocate and free memory, there could be contention for these " "mutexes. To scalably handle memory allocation in multithreaded " "applications, glibc creates additional I if mutex " "contention is detected. Each arena is a large region of memory that is " "internally allocated by the system (using B(2) or B(2)), and " "managed with its own mutexes." msgstr "" "لتجنب الفساد في التطبيقات متعددة الخيوط، تُستخدم كائنات المزامنة (mutexes) " "داخليًا لحماية هياكل بيانات إدارة الذاكرة التي توظفها هذه الدوال. في تطبيق " "متعدد الخيوط حيث تخصص الخيوط الذاكرة وتحررها في وقت واحد، قد يحدث تنافس على " "كائنات المزامنة هذه. للتعامل مع تخصيص الذاكرة بشكل قابل للتوسع في التطبيقات " "متعددة الخيوط، تنشئ glibc I<ساحات تخصيص ذاكرة> إضافية إذا اكتُشف تنافس على " "كائن المزامنة. كل ساحة هي منطقة كبيرة من الذاكرة تخصصها النظام داخليًا " "(باستخدام B(2) أو B(2))، وتُدار بكائنات المزامنة الخاصة بها." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If your program uses a private memory allocator, it should do so by " "replacing B(), B(), B(), and B(). The " "replacement functions must implement the documented glibc behaviors, " "including I handling, size-zero allocations, and overflow checking; " "otherwise, other library routines may crash or operate incorrectly. For " "example, if the replacement I() does not preserve I, then " "seemingly unrelated library routines may fail without having a valid reason " "in I. Private memory allocators may also need to replace other glibc " "functions; see \"Replacing malloc\" in the glibc manual for details." msgstr "" "إذا استخدم برنامجك مخصص ذاكرة خاصًا، فيجب أن يفعل ذلك عن طريق استبدال " "B() و B() و B() و B(). يجب أن تنفذ دوال " "الاستبدال السلوكيات الموثقة لـ glibc، بما في ذلك معالجة I، وتخصيصات " "الحجم صفر، والتحقق من الفائض؛ وإلا، فقد تتعطل أو تعمل بشكل غير صحيح روتينات " "مكتبة أخرى. على سبيل المثال، إذا لم تحافظ دالة I() البديلة على " "I، فقد تفشل روتينات مكتبة تبدو غير ذات صلة دون سبب صحيح في I. " "قد تحتاج مخصصات الذاكرة الخاصة أيضًا إلى استبدال دوال glibc أخرى؛ انظر " "\"Replacing malloc\" في دليل glibc للتفاصيل." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Crashes in memory allocators are almost always related to heap corruption, " "such as overflowing an allocated chunk or freeing the same pointer twice." msgstr "" "ترتبط الأعطال في مخصصات الذاكرة دائمًا تقريبًا بفساد الكومة، مثل تجاوز سعة " "قطعة مخصصة أو تحرير نفس المؤشر مرتين." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() implementation is tunable via environment variables; see " "B(3) for details." msgstr "" "تنفيذ B() قابل للضبط عبر متغيرات البيئة؛ انظر B(3) للتفاصيل." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Nonportable behavior" msgstr "سلوك غير محمول" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The behavior of these functions when the requested size is zero is glibc " "specific; other implementations may return NULL without setting I, " "and portable POSIX programs should tolerate such behavior. See " "B(3p)." msgstr "" "سلوك هذه الدوال عندما يكون الحجم المطلوب صفرًا خاص بـ glibc؛ قد تُرجع تطبيقات " "أخرى NULL دون تعيين I، ويجب على برامج POSIX المحمولة تحمل مثل هذا " "السلوك. انظر B(3p)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "POSIX requires memory allocators to set I upon failure. However, the " "C standard does not require this, and applications portable to non-POSIX " "platforms should not assume this." msgstr "" "يتطلب POSIX من مخصصات الذاكرة تعيين I عند الفشل. لكن، لا يتطلب معيار " "C هذا، ولا ينبغي للتطبيقات المحمولة إلى منصات غير POSIX افتراض ذلك." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Portable programs should not use private memory allocators, as POSIX and the " "C standard do not allow replacement of B(), B(), B(), " "and B()." msgstr "" "لا ينبغي للبرامج المحمولة استخدام مخصصات ذاكرة خاصة، إذ لا يسمح POSIX ومعيار " "C باستبدال B() و B() و B() و B()." #. type: SH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "BUGS" msgstr "العلل" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #| msgid "" #| "Programmers would naturally expect by induction that I<\\%realloc(p," #| "\\~size)> is consistent with I and I, as that is " #| "the behavior in the general case. This is not explicitly required by " #| "POSIX.1-2024 or C11, but all conforming implementations are consistent " #| "with that." msgid "" "Programmers would naturally expect by induction that I<\\%realloc(p,\\ " "size)> is consistent with I and I, as that is the " "behavior in the general case. This is not explicitly required by " "POSIX.1-2024 or C11, but all conforming implementations are consistent with " "that." msgstr "" "سيتوقع المبرمجون طبيعيًا بالاستقراء أن I<\\%realloc(p,\\ size)> متسق مع " "I و I، حيث أن هذا هو السلوك في الحالة العامة. هذا " "غير مطلوب صراحةً بواسطة POSIX.1-2024 أو C11، لكن جميع التطبيقات المطابقة " "متسقة مع ذلك." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #| msgid "" #| "The glibc implementation of B() is not consistent with that, " #| "and as a consequence, it is dangerous to call I<\\%realloc(p,\\~0)> in " #| "glibc." msgid "" "The glibc implementation of B() is not consistent with that, and " "as a consequence, it is dangerous to call I<\\%realloc(p,\\ 0)> in glibc." msgstr "" "تطبيق glibc للدالة B() غير متسق مع ذلك، وكنتيجة لذلك، من الخطر " "استدعاء I<\\%realloc(p,\\ 0)> في glibc." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #| msgid "" #| "A trivial workaround for glibc is calling it as I<\\%realloc(p,\\~size?" #| "size:1)>." msgid "" "A trivial workaround for glibc is calling it as I<\\%realloc(p,\\ size?" "size:1)>." msgstr "حل بديل تافه لـ glibc هو استدعاؤها كـ I<\\%realloc(p,\\ size?size:1)>." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #| msgid "" #| "The workaround for B() in glibc \\[em]which shares the " #| "same bug\\[em] would be I<\\%reallocarray(p,\\~n?n:1,\\~size?size:1)>." msgid "" "The workaround for B() in glibc \\[em]which shares the same " "bug\\[em] would be I<\\%reallocarray(p,\\ n?n:1,\\ size?size:1)>." msgstr "" "الحل البديل للدالة B() في glibc \\[em]التي تشارك نفس " "الخلل\\[em] سيكون I<\\%reallocarray(p,\\ n?n:1,\\ size?size:1)>." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "أمثلة" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "#include Eerr.hE\n" "#include Estddef.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "\\&\n" "#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" "#define MALLOC(type) MALLOCARRAY(1, type)\n" "\\&\n" "static inline void *my_mallocarray(size_t n, size_t size);\n" "\\&\n" "int\n" "main(void)\n" "{\n" " char *p;\n" "\\&\n" " p = MALLOCARRAY(32, char);\n" " if (p == NULL)\n" " err(EXIT_FAILURE, \"malloc\");\n" "\\&\n" " strlcpy(p, \"foo\", 32);\n" " puts(p);\n" "}\n" "\\&\n" "static inline void *\n" "my_mallocarray(size_t n, size_t size)\n" "{\n" " return reallocarray(NULL, n, size);\n" "}\n" msgstr "" "#include Eerr.hE\n" "#include Estddef.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "\\&\n" "#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" "#define MALLOC(type) MALLOCARRAY(1, type)\n" "\\&\n" "static inline void *my_mallocarray(size_t n, size_t size);\n" "\\&\n" "int\n" "main(void)\n" "{\n" " char *p;\n" "\\&\n" " p = MALLOCARRAY(32, char);\n" " if (p == NULL)\n" " err(EXIT_FAILURE, \"malloc\");\n" "\\&\n" " strlcpy(p, \"foo\", 32);\n" " puts(p);\n" "}\n" "\\&\n" "static inline void *\n" "my_mallocarray(size_t n, size_t size)\n" "{\n" " return reallocarray(NULL, n, size);\n" "}\n" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "انظر أيضًا" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B(1), B(2), B(2), B(3), B(3), " "B(3), B(3), B(3), " "B(3), B(3), B(3), B(3)" msgstr "" "B(1), B(2), B(2), B(3), B(3), " "B(3), B(3), B(3), " "B(3), B(3), B(3), B(3)" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "For details of the GNU C library implementation, see E<.UR https:\\://" "sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" msgstr "" "لتفاصيل تنفيذ مكتبة سي لجنو، انظر E<.UR https:\\//sourceware.org/glibc/wiki/" "MallocInternals> E<.UE .>" #. type: TH #: debian-trixie #, no-wrap msgid "2024-05-02" msgstr "2 مايو 2024" #. type: TH #: debian-trixie #, no-wrap msgid "Linux man-pages 6.9.1" msgstr "صفحات دليل لينكس 6.9.1" #. type: Plain text #: debian-trixie msgid "Standard C library (I, I<-lc>)" msgstr "مكتبة سي المعيارية (I، I<-lc>)" #. type: Plain text #: debian-trixie #, no-wrap msgid "" "BIB<);>\n" "BIB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<, size_t " ">IB<);>\n" msgstr "" "BIB<);>\n" "BIB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<, size_t " ">IB<);>\n" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "The B() function frees the memory space pointed to by I, which " "must have been returned by a previous call to B() or related " "functions. Otherwise, or if I has already been freed, undefined " "behavior occurs. If I is NULL, no operation is performed." msgstr "" "الدالة B() تُحرر مساحة الذاكرة المُشار إليها بواسطة I، والتي يجب" " أن " "تكون قد أُعيدت بواسطة استدعاء سابق لـ B() أو دوال ذات صلة. وإلا، أو " "إذا كان I قد حُرر بالفعل، يحدث سلوك غير مُحدد. إذا كان I هو NULL،" " لا " "يُنفذ أي عملية." #. type: Plain text #: debian-trixie msgid "" "The B() function allocates memory for an array of I elements " "of I bytes each and returns a pointer to the allocated memory. The " "memory is set to zero. If I or I is 0, then B() " "returns a unique pointer value that can later be successfully passed to " "B()." msgstr "" "الدالة B() تُخصص ذاكرة لمصفوفة من I عنصرًا، كل منها بحجم " "I بايت، وتُعيد مؤشرًا إلى الذاكرة المُخصصة. تُضبط الذاكرة إلى الصفر." " إذا " "كان I أو I يساوي 0، فإن B() تُعيد قيمة مؤشر فريدة يمكن " "تمريرها لاحقًا بنجاح إلى B()." #. type: Plain text #: debian-trixie msgid "" "If the multiplication of I and I would result in integer " "overflow, then B() returns an error. By contrast, an integer " "overflow would not be detected in the following call to B(), with " "the result that an incorrectly sized block of memory would be allocated:" msgstr "" "إذا أدى ضرب I و I إلى تجاوز عدد صحيح، فإن B() تُعيد خطأ. " "على النقيض، لا يُكتشف تجاوز عدد صحيح في الاستدعاء التالي لـ B()، مما " "يؤدي إلى تخصيص كتلة ذاكرة بحجم غير صحيح:" #. type: Plain text #: debian-trixie #, no-wrap msgid "malloc(nmemb * size);\n" msgstr "malloc(nmemb * size);\n" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "The B() function changes the size of the memory block pointed to " "by I to I bytes. The contents of the memory will be unchanged in " "the range from the start of the region up to the minimum of the old and new " "sizes. If the new size is larger than the old size, the added memory will " "I be initialized." msgstr "" "الدالة B() تُغير حجم كتلة الذاكرة المُشار إليها بواسطة I إلى " "I بايت. تبقى محتويات الذاكرة دون تغيير في النطاق من بداية المنطقة حتى " "الحد الأدنى للحجمين القديم والجديد. إذا كان الحجم الجديد أكبر من الحجم " "القديم، فإن الذاكرة المُضافة I<لا> تُهيأ." #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "If I is NULL, then the call is equivalent to I, for all " "values of I." msgstr "" "إذا كان I هو NULL، فإن الاستدعاء يُعادل I، لجميع قيم " "I." #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "If I is equal to zero, and I is not NULL, then the call is " "equivalent to I (but see \"Nonportable behavior\" for portability " "issues)." msgstr "" "إذا كان I يساوي صفرًا، و I ليس NULL، فإن الاستدعاء يُعادل " "I (ولكن انظر \"سلوك غير محمول\" لمشكلات قابلية النقل)." #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "Unless I is NULL, it must have been returned by an earlier call to " "B or related functions. If the area pointed to was moved, a " "I is done." msgstr "" "ما لم يكن I هو NULL، يجب أن يكون قد أُعيد بواسطة استدعاء سابق لـ " "B أو دوال ذات صلة. إذا نُقلت المنطقة المُشار إليها، يُنفذ I." #. type: Plain text #: debian-trixie msgid "" "The B() function changes the size of (and possibly moves) " "the memory block pointed to by I to be large enough for an array of " "I elements, each of which is I bytes. It is equivalent to the " "call" msgstr "" "الدالة B() تُغير حجم (وربما تنقل) كتلة الذاكرة المُشار إليها " "بواسطة I لتكون كبيرة بما يكفي لمصفوفة من I عنصرًا، كل منها بحجم " "I بايت. تُعادل الاستدعاء" #. type: Plain text #: debian-trixie #, no-wrap msgid "realloc(ptr, nmemb * size);\n" msgstr "realloc(ptr, nmemb * size);\n" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "The B() and B() functions return NULL if I is " "not NULL and the requested size is zero; this is not considered an error. " "(See \"Nonportable behavior\" for portability issues.) Otherwise, the " "returned pointer may be the same as I if the allocation was not moved " "(e.g., there was room to expand the allocation in-place), or different from " "I if the allocation was moved to a new address. If these functions " "fail, the original block is left untouched; it is not freed or moved." msgstr "" "الدالتان B() و B() تُعيدان NULL إذا كان I ليس " "NULL والحجم المطلوب هو صفر؛ لا يُعتبر هذا خطأ. (انظر \"سلوك غير محمول\" " "لمشكلات قابلية النقل.) وإلا، قد يكون المؤشر المُعاد هو نفسه I إذا لم " "يُنقل التخصيص (مثلًا، وُجدت مساحة لتوسيع التخصيص في مكانه)، أو مختلفًا عن I<" "ptr> " "إذا نُقل التخصيص إلى عنوان جديد. إذا فشلت هذه الدوال، تُترك الكتلة الأصلية" " دون " "تغيير؛ لا تُحرر ولا تُنقل." #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "C11, POSIX.1-2008." msgstr "C11, POSIX.1-2008." #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "None." msgstr "لا شيء." #. type: Plain text #: debian-trixie #, no-wrap msgid "" "#include Eerr.hE\n" "#include Estddef.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "\\&\n" "#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" "#define MALLOC(type) MALLOCARRAY(1, type)\n" "\\&\n" "static inline void *my_mallocarray(size_t nmemb, size_t size);\n" "\\&\n" "int\n" "main(void)\n" "{\n" " char *p;\n" "\\&\n" " p = MALLOCARRAY(32, char);\n" " if (p == NULL)\n" " err(EXIT_FAILURE, \"malloc\");\n" "\\&\n" " strlcpy(p, \"foo\", 32);\n" " puts(p);\n" "}\n" "\\&\n" "static inline void *\n" "my_mallocarray(size_t nmemb, size_t size)\n" "{\n" " return reallocarray(NULL, nmemb, size);\n" "}\n" msgstr "" "#include Eerr.hE\n" "#include Estddef.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "\\&\n" "#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" "#define MALLOC(type) MALLOCARRAY(1, type)\n" "\\&\n" "static inline void *my_mallocarray(size_t nmemb, size_t size);\n" "\\&\n" "int\n" "main(void)\n" "{\n" " char *p;\n" "\\&\n" " p = MALLOCARRAY(32, char);\n" " if (p == NULL)\n" " err(EXIT_FAILURE, \"malloc\");\n" "\\&\n" " strlcpy(p, \"foo\", 32);\n" " puts(p);\n" "}\n" "\\&\n" "static inline void *\n" "my_mallocarray(size_t nmemb, size_t size)\n" "{\n" " return reallocarray(NULL, nmemb, size);\n" "}\n" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "For details of the GNU C library implementation, see E<.UR https://" "sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" msgstr "" "لتفاصيل تنفيذ مكتبة سي لجنو، انظر E<.UR https://sourceware.org/glibc/wiki/" "MallocInternals> E<.UE .>" #. type: TH #: fedora-44 fedora-rawhide #, no-wrap msgid "2024-11-17" msgstr "17 نوفمبر 2024" #. type: TH #: fedora-44 fedora-rawhide #, no-wrap msgid "Linux man-pages 6.13" msgstr "صفحات دليل لينكس 6.13" #. type: Plain text #: fedora-44 fedora-rawhide #, no-wrap msgid "" "BIB<);>\n" "BIB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<, size_t >I<" "size>B<);>\n" msgstr "" "BIB<);>\n" "BIB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<, size_t >I<" "size>B<);>\n" #. type: Plain text #: fedora-44 fedora-rawhide msgid "" "The B() function changes the size of (and possibly moves) " "the memory block pointed to by I to be large enough for an array of " "I elements, each of which is I bytes. It is equivalent to the call" msgstr "" "الدالة B() تُغير حجم (وربما تنقل) كتلة الذاكرة المُشار إليها " "بواسطة I لتكون كبيرة بما يكفي لمصفوفة من I عنصرًا، كل منها بحجم " "I بايت. تُعادل الاستدعاء" #. type: Plain text #: fedora-44 fedora-rawhide #, no-wrap msgid "realloc(ptr, n * size);\n" msgstr "realloc(ptr, n * size);\n" #. type: TH #: mageia-cauldron #, no-wrap msgid "Linux man-pages 6.17" msgstr "صفحات دليل لينكس 6.17" #. type: TH #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Linux man-pages (unreleased)" msgstr "صفحات دليل لينكس (لم تصدر بعد)"