# Russian translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # aereiae , 2014. # Alexey , 2015. # Azamat Hackimov , 2013-2017. # Dmitriy S. Seregin , 2013. # Dmitry Bolkhovskikh , 2017. # ITriskTI , 2013. # Max Is , 2016. # Yuri Kozlov , 2011-2019. # Иван Павлов , 2017. # Малянов Евгений Викторович , 2014. msgid "" msgstr "" "Project-Id-Version: manpages-l10n\n" "POT-Creation-Date: 2024-06-01 06:01+0200\n" "PO-Revision-Date: 2019-10-06 08:59+0300\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" "%100>=11 && n%100<=14)? 2 : 3);\n" "X-Generator: Lokalize 2.0\n" #. type: TH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "B()" msgid "malloc_info" msgstr "B()" #. type: TH #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "2024-05-02" msgstr "2 мая 2024 г." #. type: TH #: archlinux debian-unstable #, fuzzy, no-wrap #| msgid "Linux man-pages 6.7" msgid "Linux man-pages 6.8" msgstr "Linux man-pages 6.7" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "ИМЯ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "malloc_info - export malloc state to a stream" msgstr "malloc_info - экспортирует состояние malloc в поток" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Standard C library (I, I<-lc>)" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "СИНТАКСИС" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<#include Emalloc.hE>\n" msgstr "B<#include Emalloc.hE>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "BIB<, FILE *>IB<);>\n" msgstr "BIB<, FILE *>IB<);>\n" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "ОПИСАНИЕ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The B() function exports an XML string that describes the " "current state of the memory-allocation implementation in the caller. The " "string is printed on the file stream I. The exported string " "includes information about all arenas (see B(3))." msgstr "" "Функция B() экспортирует строку XML, описывающую текущее " "состояние реализации выделения памяти вызывающего. Строка печатается в " "файловый поток I. В экспортируемой строке содержится информация о " "всех областях (arenas) (смотрите B(3))." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "As currently implemented, I must be zero." msgstr "В текущей реализации значение I должно быть равно нулю." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "RETURN VALUE" msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "On success, B() returns 0; on error, it returns -1, with " #| "I set to indicate the cause." msgid "" "On success, B() returns 0. On failure, it returns -1, and " "I is set to indicate the error." msgstr "" "При успешном выполнении B() возвращается 0; при ошибке " "возвращается -1, а в I помещается код ошибки." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "ERRORS" msgstr "ОШИБКИ" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I was nonzero." msgstr "Значение I не равно." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "ATTRIBUTES" msgstr "АТРИБУТЫ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "For an explanation of the terms used in this section, see B(7)." msgstr "Описание терминов данного раздела смотрите в B(7)." #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Interface" msgstr "Интерфейс" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Attribute" msgstr "Атрибут" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Value" msgstr "Значение" #. type: tbl table #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid ".na\n" msgstr ".na\n" #. type: tbl table #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid ".nh\n" msgstr ".nh\n" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Thread safety" msgstr "Безвредность в нитях" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "MT-Safe" msgstr "MT-Safe" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "СТАНДАРТЫ" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "GNU." msgstr "GNU." #. type: SH #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "ИСТОРИЯ" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "Since glibc 2.10:" msgid "glibc 2.10." msgstr "Начиная с glibc 2.10:" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NOTES" msgstr "ПРИМЕЧАНИЯ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The memory-allocation information is provided as an XML string (rather than " "a C structure) because the information may change over time (according to " "changes in the underlying implementation). The output XML string includes a " "version field." msgstr "" "Информация о выделении памяти предоставляется в виде строки XML (а не в " "структуре C), так как структура со временем может меняться (при изменении в " "реализации). Возвращаемая строка XML содержит поле версии." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The B(3) function can be used to send the output of " "B() directly into a buffer in memory, rather than to a file." msgstr "" "Для отправки вывода B() в буфер памяти, а не в файл можно " "использовать функцию B(3)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The B() function is designed to address deficiencies in " "B(3) and B(3)." msgstr "" "Функция B() разработана для компенсации нехватки данных из " "B(3) и B(3)." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "ПРИМЕРЫ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The program below takes up to four command-line arguments, of which the " "first three are mandatory. The first argument specifies the number of " "threads that the program should create. All of the threads, including the " "main thread, allocate the number of blocks of memory specified by the second " "argument. The third argument controls the size of the blocks to be " "allocated. The main thread creates blocks of this size, the second thread " "created by the program allocates blocks of twice this size, the third thread " "allocates blocks of three times this size, and so on." msgstr "" "Программа, представленная ниже, принимает до четырёх параметров командной " "строки, три из которых обязательны. В первом параметре задаётся количество " "нитей, которые должна создать программа. Все нити, включая главную нить, " "выделяют количество блоков памяти, заданное в втором параметре. В третьем " "параметре задаётся размер выделяемых блоков. Главная нить создает блоки " "этого размера, вторая нить создаваемая программой, выделяет блоки " "двукратного размера, третья нить выделяет блоки трёхкратного размера и так " "далее." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The program calls B() twice to display the memory-allocation " "state. The first call takes place before any threads are created or memory " "allocated. The second call is performed after all threads have allocated " "memory." msgstr "" "Чтобы показать состояние выделения памяти программа дважды вызывает " "B(). Первый раз вызов делается до создания нитей и выделения " "памяти. Второй вызов выполняется после того, как все нити выделят память." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "In the following example, the command-line arguments specify the creation of " "one additional thread, and both the main thread and the additional thread " "allocate 10000 blocks of memory. After the blocks of memory have been " "allocated, B() shows the state of two allocation arenas." msgstr "" "В следующем примере аргументами командной строки задаётся создание одной " "дополнительной нити и что главная и дополнительная нить выделяют 10000 " "блоков памяти. После того, как блоки памяти выделены, B() " "показывает состояние двух областей выделения." #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "" #| "============ After allocating blocks ============\n" #| "Emalloc version=\"1\"E\n" #| "Eheap nr=\"0\"E\n" #| "EsizesE\n" #| "E/sizesE\n" #| "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" #| "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" #| "Esystem type=\"current\" size=\"1081344\"/E\n" #| "Esystem type=\"max\" size=\"1081344\"/E\n" #| "Easpace type=\"total\" size=\"1081344\"/E\n" #| "Easpace type=\"mprotect\" size=\"1081344\"/E\n" #| "E/heapE\n" #| "Eheap nr=\"1\"E\n" #| "EsizesE\n" #| "E/sizesE\n" #| "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" #| "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" #| "Esystem type=\"current\" size=\"1032192\"/E\n" #| "Esystem type=\"max\" size=\"1032192\"/E\n" #| "Easpace type=\"total\" size=\"1032192\"/E\n" #| "Easpace type=\"mprotect\" size=\"1032192\"/E\n" #| "E/heapE\n" #| "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" #| "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" #| "Esystem type=\"current\" size=\"2113536\"/E\n" #| "Esystem type=\"max\" size=\"2113536\"/E\n" #| "Easpace type=\"total\" size=\"2113536\"/E\n" #| "Easpace type=\"mprotect\" size=\"2113536\"/E\n" #| "E/mallocE\n" msgid "" "$ B\n" "glibc 2.13\n" "$ B<./a.out 1 10000 100>\n" "============ Before allocating blocks ============\n" "Emalloc version=\"1\"E\n" "Eheap nr=\"0\"E\n" "EsizesE\n" "E/sizesE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"135168\"/E\n" "Esystem type=\"max\" size=\"135168\"/E\n" "Easpace type=\"total\" size=\"135168\"/E\n" "Easpace type=\"mprotect\" size=\"135168\"/E\n" "E/heapE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"135168\"/E\n" "Esystem type=\"max\" size=\"135168\"/E\n" "Easpace type=\"total\" size=\"135168\"/E\n" "Easpace type=\"mprotect\" size=\"135168\"/E\n" "E/mallocE\n" "\\&\n" "============ After allocating blocks ============\n" "Emalloc version=\"1\"E\n" "Eheap nr=\"0\"E\n" "EsizesE\n" "E/sizesE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"1081344\"/E\n" "Esystem type=\"max\" size=\"1081344\"/E\n" "Easpace type=\"total\" size=\"1081344\"/E\n" "Easpace type=\"mprotect\" size=\"1081344\"/E\n" "E/heapE\n" "Eheap nr=\"1\"E\n" "EsizesE\n" "E/sizesE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"1032192\"/E\n" "Esystem type=\"max\" size=\"1032192\"/E\n" "Easpace type=\"total\" size=\"1032192\"/E\n" "Easpace type=\"mprotect\" size=\"1032192\"/E\n" "E/heapE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"2113536\"/E\n" "Esystem type=\"max\" size=\"2113536\"/E\n" "Easpace type=\"total\" size=\"2113536\"/E\n" "Easpace type=\"mprotect\" size=\"2113536\"/E\n" "E/mallocE\n" msgstr "" "============ после выделения блоков ============\n" "Emalloc version=\"1\"E\n" "Eheap nr=\"0\"E\n" "EsizesE\n" "E/sizesE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"1081344\"/E\n" "Esystem type=\"max\" size=\"1081344\"/E\n" "Easpace type=\"total\" size=\"1081344\"/E\n" "Easpace type=\"mprotect\" size=\"1081344\"/E\n" "E/heapE\n" "Eheap nr=\"1\"E\n" "EsizesE\n" "E/sizesE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"1032192\"/E\n" "Esystem type=\"max\" size=\"1032192\"/E\n" "Easpace type=\"total\" size=\"1032192\"/E\n" "Easpace type=\"mprotect\" size=\"1032192\"/E\n" "E/heapE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"2113536\"/E\n" "Esystem type=\"max\" size=\"2113536\"/E\n" "Easpace type=\"total\" size=\"2113536\"/E\n" "Easpace type=\"mprotect\" size=\"2113536\"/E\n" "E/mallocE\n" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Program source" msgstr "Исходный код программы" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "" "#include Eerr.hE\n" "#include Eerrno.hE\n" "#include Emalloc.hE\n" "#include Epthread.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" "\\&\n" "static size_t blockSize;\n" "static size_t numThreads;\n" "static unsigned int numBlocks;\n" "\\&\n" "static void *\n" "thread_func(void *arg)\n" "{\n" " int tn = (int) arg;\n" "\\&\n" " /* The multiplier \\[aq](2 + tn)\\[aq] ensures that each thread (including\n" " the main thread) allocates a different amount of memory. */\n" "\\&\n" " for (unsigned int j = 0; j E numBlocks; j++)\n" " if (malloc(blockSize * (2 + tn)) == NULL)\n" " err(EXIT_FAILURE, \"malloc-thread\");\n" "\\&\n" " sleep(100); /* Sleep until main thread terminates. */\n" " return NULL;\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int sleepTime;\n" " pthread_t *thr;\n" "\\&\n" " if (argc E 4) {\n" " fprintf(stderr,\n" " \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n" " argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " numThreads = atoi(argv[1]);\n" " numBlocks = atoi(argv[2]);\n" " blockSize = atoi(argv[3]);\n" " sleepTime = (argc E 4) ? atoi(argv[4]) : 0;\n" "\\&\n" " thr = calloc(numThreads, sizeof(*thr));\n" " if (thr == NULL)\n" " err(EXIT_FAILURE, \"calloc\");\n" "\\&\n" " printf(\"============ Before allocating blocks ============\\en\");\n" " malloc_info(0, stdout);\n" "\\&\n" " /* Create threads that allocate different amounts of memory. */\n" "\\&\n" " for (size_t tn = 0; tn E numThreads; tn++) {\n" " errno = pthread_create(&thr[tn], NULL, thread_func,\n" " (void *) tn);\n" " if (errno != 0)\n" " err(EXIT_FAILURE, \"pthread_create\");\n" "\\&\n" " /* If we add a sleep interval after the start-up of each\n" " thread, the threads likely won\\[aq]t contend for malloc\n" " mutexes, and therefore additional arenas won\\[aq]t be\n" " allocated (see malloc(3)). */\n" "\\&\n" " if (sleepTime E 0)\n" " sleep(sleepTime);\n" " }\n" "\\&\n" " /* The main thread also allocates some memory. */\n" "\\&\n" " for (unsigned int j = 0; j E numBlocks; j++)\n" " if (malloc(blockSize) == NULL)\n" " err(EXIT_FAILURE, \"malloc\");\n" "\\&\n" " sleep(2); /* Give all threads a chance to\n" " complete allocations. */\n" "\\&\n" " printf(\"\\en============ After allocating blocks ============\\en\");\n" " malloc_info(0, stdout);\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" #. SRC END #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "СМОТРИТЕ ТАКЖЕ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B(3), B(3), B(3), B(3), " "B(3)" msgstr "" "B(3), B(3), B(3), B(3), " "B(3)" #. type: TH #: debian-bookworm #, no-wrap msgid "2023-02-05" msgstr "5 февраля 2023 г." #. type: TH #: debian-bookworm #, no-wrap msgid "Linux man-pages 6.03" msgstr "Linux man-pages 6.03" #. type: SH #: debian-bookworm #, no-wrap msgid "VERSIONS" msgstr "ВЕРСИИ" #. type: Plain text #: debian-bookworm #, fuzzy #| msgid "B() was added to glibc in version 2.10." msgid "B() was added in glibc 2.10." msgstr "Функция B() впервые появилась в glibc 2.10." #. type: Plain text #: debian-bookworm msgid "This function is a GNU extension." msgstr "Эта функция является расширением GNU." #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "$ B\n" "glibc 2.13\n" "$ B<./a.out 1 10000 100>\n" "============ Before allocating blocks ============\n" "Emalloc version=\"1\"E\n" "Eheap nr=\"0\"E\n" "EsizesE\n" "E/sizesE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"135168\"/E\n" "Esystem type=\"max\" size=\"135168\"/E\n" "Easpace type=\"total\" size=\"135168\"/E\n" "Easpace type=\"mprotect\" size=\"135168\"/E\n" "E/heapE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"135168\"/E\n" "Esystem type=\"max\" size=\"135168\"/E\n" "Easpace type=\"total\" size=\"135168\"/E\n" "Easpace type=\"mprotect\" size=\"135168\"/E\n" "E/mallocE\n" msgstr "" "$ B\n" "glibc 2.13\n" "$ B<./a.out 1 10000 100>\n" "============ до выделения блоков ============\n" "Emalloc version=\"1\"E\n" "Eheap nr=\"0\"E\n" "EsizesE\n" "E/sizesE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"135168\"/E\n" "Esystem type=\"max\" size=\"135168\"/E\n" "Easpace type=\"total\" size=\"135168\"/E\n" "Easpace type=\"mprotect\" size=\"135168\"/E\n" "E/heapE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"135168\"/E\n" "Esystem type=\"max\" size=\"135168\"/E\n" "Easpace type=\"total\" size=\"135168\"/E\n" "Easpace type=\"mprotect\" size=\"135168\"/E\n" "E/mallocE\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "============ After allocating blocks ============\n" "Emalloc version=\"1\"E\n" "Eheap nr=\"0\"E\n" "EsizesE\n" "E/sizesE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"1081344\"/E\n" "Esystem type=\"max\" size=\"1081344\"/E\n" "Easpace type=\"total\" size=\"1081344\"/E\n" "Easpace type=\"mprotect\" size=\"1081344\"/E\n" "E/heapE\n" "Eheap nr=\"1\"E\n" "EsizesE\n" "E/sizesE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"1032192\"/E\n" "Esystem type=\"max\" size=\"1032192\"/E\n" "Easpace type=\"total\" size=\"1032192\"/E\n" "Easpace type=\"mprotect\" size=\"1032192\"/E\n" "E/heapE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"2113536\"/E\n" "Esystem type=\"max\" size=\"2113536\"/E\n" "Easpace type=\"total\" size=\"2113536\"/E\n" "Easpace type=\"mprotect\" size=\"2113536\"/E\n" "E/mallocE\n" msgstr "" "============ после выделения блоков ============\n" "Emalloc version=\"1\"E\n" "Eheap nr=\"0\"E\n" "EsizesE\n" "E/sizesE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"1081344\"/E\n" "Esystem type=\"max\" size=\"1081344\"/E\n" "Easpace type=\"total\" size=\"1081344\"/E\n" "Easpace type=\"mprotect\" size=\"1081344\"/E\n" "E/heapE\n" "Eheap nr=\"1\"E\n" "EsizesE\n" "E/sizesE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"1032192\"/E\n" "Esystem type=\"max\" size=\"1032192\"/E\n" "Easpace type=\"total\" size=\"1032192\"/E\n" "Easpace type=\"mprotect\" size=\"1032192\"/E\n" "E/heapE\n" "Etotal type=\"fast\" count=\"0\" size=\"0\"/E\n" "Etotal type=\"rest\" count=\"0\" size=\"0\"/E\n" "Esystem type=\"current\" size=\"2113536\"/E\n" "Esystem type=\"max\" size=\"2113536\"/E\n" "Easpace type=\"total\" size=\"2113536\"/E\n" "Easpace type=\"mprotect\" size=\"2113536\"/E\n" "E/mallocE\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| "#include Emqueue.hE\n" #| "#include Esys/stat.hE\n" #| "#include Efcntl.hE\n" #| "#include Estdio.hE\n" #| "#include Estdlib.hE\n" #| "#include Eunistd.hE\n" msgid "" "#include Eerr.hE\n" "#include Eerrno.hE\n" "#include Emalloc.hE\n" "#include Epthread.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" msgstr "" "#include Emqueue.hE\n" "#include Esys/stat.hE\n" "#include Efcntl.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| "static size_t blockSize;\n" #| "static int numThreads, numBlocks;\n" msgid "" "static size_t blockSize;\n" "static size_t numThreads;\n" "static unsigned int numBlocks;\n" msgstr "" "static size_t blockSize;\n" "static int numThreads, numBlocks;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| "static void *\n" #| "thread_func(void *arg)\n" #| "{\n" #| " int j;\n" #| " int tn = (int) arg;\n" msgid "" "static void *\n" "thread_func(void *arg)\n" "{\n" " int tn = (int) arg;\n" msgstr "" "static void *\n" "thread_func(void *arg)\n" "{\n" " int j;\n" " int tn = (int) arg;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| " /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n" #| " the main thread) allocates a different amount of memory */\n" msgid "" " /* The multiplier \\[aq](2 + tn)\\[aq] ensures that each thread (including\n" " the main thread) allocates a different amount of memory. */\n" msgstr "" " /* Множитель \\(aq(2 + tn)\\(aq для обеспечения того, что каждая\n" " нить (включая главную) выделяет разное количество памяти */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| " for (j = 0; j E numBlocks; j++)\n" #| " if (malloc(blockSize * (2 + tn)) == NULL)\n" #| " errExit(\"malloc-thread\");\n" msgid "" " for (unsigned int j = 0; j E numBlocks; j++)\n" " if (malloc(blockSize * (2 + tn)) == NULL)\n" " err(EXIT_FAILURE, \"malloc-thread\");\n" msgstr "" " for (j = 0; j E numBlocks; j++)\n" " if (malloc(blockSize * (2 + tn)) == NULL)\n" " errExit(\"malloc-thread\");\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| " sleep(100); /* Sleep until main thread terminates */\n" #| " return NULL;\n" #| "}\n" msgid "" " sleep(100); /* Sleep until main thread terminates. */\n" " return NULL;\n" "}\n" msgstr "" " sleep(100); /* Спим, пока главная нить не завершит работу */\n" " return NULL;\n" "}\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| "int\n" #| "main(int argc, char *argv[])\n" #| "{\n" #| " int j, tn, sleepTime;\n" #| " pthread_t *thr;\n" msgid "" "int\n" "main(int argc, char *argv[])\n" "{\n" " int sleepTime;\n" " pthread_t *thr;\n" msgstr "" "int\n" "main(int argc, char *argv[])\n" "{\n" " int j, tn, sleepTime;\n" " pthread_t *thr;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (argc E 4) {\n" " fprintf(stderr,\n" " \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n" " argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " if (argc E 4) {\n" " fprintf(stderr,\n" " \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n" " argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " numThreads = atoi(argv[1]);\n" " numBlocks = atoi(argv[2]);\n" " blockSize = atoi(argv[3]);\n" " sleepTime = (argc E 4) ? atoi(argv[4]) : 0;\n" msgstr "" " numThreads = atoi(argv[1]);\n" " numBlocks = atoi(argv[2]);\n" " blockSize = atoi(argv[3]);\n" " sleepTime = (argc E 4) ? atoi(argv[4]) : 0;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| " thr = calloc(numThreads, sizeof(pthread_t));\n" #| " if (thr == NULL)\n" #| " errExit(\"calloc\");\n" msgid "" " thr = calloc(numThreads, sizeof(*thr));\n" " if (thr == NULL)\n" " err(EXIT_FAILURE, \"calloc\");\n" msgstr "" " thr = calloc(numThreads, sizeof(pthread_t));\n" " if (thr == NULL)\n" " errExit(\"calloc\");\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " printf(\"============ Before allocating blocks ============\\en\");\n" " malloc_info(0, stdout);\n" msgstr "" " printf(\"============ до выделения блоков ============\\en\");\n" " malloc_info(0, stdout);\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid " /* Create threads that allocate different amounts of memory */\n" msgid " /* Create threads that allocate different amounts of memory. */\n" msgstr " /* Создаём нити, которые выделяют разное количество памяти */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| " for (tn = 0; tn E numThreads; tn++) {\n" #| " errno = pthread_create(&thr[tn], NULL, thread_func,\n" #| " (void *) tn);\n" #| " if (errno != 0)\n" #| " errExit(\"pthread_create\");\n" msgid "" " for (size_t tn = 0; tn E numThreads; tn++) {\n" " errno = pthread_create(&thr[tn], NULL, thread_func,\n" " (void *) tn);\n" " if (errno != 0)\n" " err(EXIT_FAILURE, \"pthread_create\");\n" msgstr "" " for (tn = 0; tn E numThreads; tn++) {\n" " errno = pthread_create(&thr[tn], NULL, thread_func,\n" " (void *) tn);\n" " if (errno != 0)\n" " errExit(\"pthread_create\");\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| " /* If we add a sleep interval after the start-up of each\n" #| " thread, the threads likely won\\(aqt contend for malloc\n" #| " mutexes, and therefore additional arenas won\\(aqt be\n" #| " allocated (see malloc(3)). */\n" msgid "" " /* If we add a sleep interval after the start-up of each\n" " thread, the threads likely won\\[aq]t contend for malloc\n" " mutexes, and therefore additional arenas won\\[aq]t be\n" " allocated (see malloc(3)). */\n" msgstr "" " /* если мы добавим задержку после запуска каждой нити,\n" " то нити, вероятно, не будут бороться за мьютекс malloc,\n" " и поэтому дополнительные области выделены\n" " не будут (смотрите malloc(3)) */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (sleepTime E 0)\n" " sleep(sleepTime);\n" " }\n" msgstr "" " if (sleepTime E 0)\n" " sleep(sleepTime);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid " /* The main thread also allocates some memory */\n" msgid " /* The main thread also allocates some memory. */\n" msgstr " /* главная нить также выделяет память */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| " for (j = 0; j E numBlocks; j++)\n" #| " if (malloc(blockSize) == NULL)\n" #| " errExit(\"malloc\");\n" msgid "" " for (unsigned int j = 0; j E numBlocks; j++)\n" " if (malloc(blockSize) == NULL)\n" " err(EXIT_FAILURE, \"malloc\");\n" msgstr "" " for (j = 0; j E numBlocks; j++)\n" " if (malloc(blockSize) == NULL)\n" " errExit(\"malloc\");\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| " sleep(2); /* Give all threads a chance to\n" #| " complete allocations */\n" msgid "" " sleep(2); /* Give all threads a chance to\n" " complete allocations. */\n" msgstr "" " sleep(2); /* ждём, чтобы потоки успели\n" " выделить память */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " printf(\"\\en============ After allocating blocks ============\\en\");\n" " malloc_info(0, stdout);\n" msgstr "" " printf(\"\\en============ после выделения блоков ============\\en\");\n" " malloc_info(0, stdout);\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" " exit(EXIT_SUCCESS);\n" "}\n" #. type: TH #: fedora-40 mageia-cauldron #, no-wrap msgid "2023-10-31" msgstr "31 октября 2023 г." #. type: TH #: fedora-40 mageia-cauldron #, no-wrap msgid "Linux man-pages 6.06" msgstr "Linux man-pages 6.06" #. type: TH #: fedora-rawhide #, no-wrap msgid "2024-02-26" msgstr "26 февраля 2024 г." #. type: TH #: fedora-rawhide #, no-wrap msgid "Linux man-pages 6.7" msgstr "Linux man-pages 6.7" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "2023-03-30" msgstr "30 марта 2023 г." #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "Linux man-pages 6.04" msgstr "Linux man-pages 6.04" #. type: TH #: opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "Linux man-pages 6.7" msgid "Linux man-pages (unreleased)" msgstr "Linux man-pages 6.7"