Skip to content

Commit 5b1c889

Browse files
committed
Traducido c-api/memory.po
1 parent 1c21578 commit 5b1c889

File tree

1 file changed

+65
-12
lines changed

1 file changed

+65
-12
lines changed

Diff for: c-api/memory.po

+65-12
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ msgstr ""
1111
"Project-Id-Version: Python 3.11\n"
1212
"Report-Msgid-Bugs-To: \n"
1313
"POT-Creation-Date: 2024-11-21 16:38-0300\n"
14-
"PO-Revision-Date: 2022-10-27 03:12-0300\n"
14+
"PO-Revision-Date: 2025-02-02 10:07-0500\n"
1515
"Last-Translator: Marco Richetta <[email protected]>\n"
16-
"Language: es\n"
1716
"Language-Team: python-doc-es\n"
18-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
17+
"Language: es\n"
1918
"MIME-Version: 1.0\n"
2019
"Content-Type: text/plain; charset=utf-8\n"
2120
"Content-Transfer-Encoding: 8bit\n"
21+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
2222
"Generated-By: Babel 2.16.0\n"
23+
"X-Generator: Poedit 3.5\n"
2324

2425
#: ../Doc/c-api/memory.rst:8
2526
msgid "Memory Management"
@@ -121,6 +122,15 @@ msgid ""
121122
"free(buf); /* malloc'ed */\n"
122123
"return res;"
123124
msgstr ""
125+
"PyObject *res;\n"
126+
"char *buf = (char *) malloc(BUFSIZ); /* for I/O */\n"
127+
"\n"
128+
"if (buf == NULL)\n"
129+
" return PyErr_NoMemory();\n"
130+
"...Do some I/O operation involving buf...\n"
131+
"res = PyBytes_FromString(buf);\n"
132+
"free(buf); /* malloc'ed */\n"
133+
"return res;"
124134

125135
#: ../Doc/c-api/memory.rst:68
126136
msgid ""
@@ -270,10 +280,15 @@ msgid ""
270280
"`PyMem_Malloc`, :c:func:`PyMem_RawMalloc`, or :c:func:`malloc`, but not :c:"
271281
"func:`PyObject_Malloc`."
272282
msgstr ""
283+
"Por ejemplo, *buffers* (objetos que no son de Python) deben asignarse "
284+
"usando :c:func:`PyMem_Malloc`, :c:func:`PyMem_RawMalloc`, o :c:func:"
285+
"`malloc`, pero no :c:func:`PyObject_Malloc`."
273286

274287
#: ../Doc/c-api/memory.rst:133
275288
msgid "See :ref:`Memory Allocation APIs <free-threaded-memory-allocation>`."
276289
msgstr ""
290+
"Consulte :ref:`APIs de Asignación de Memoria <free-threaded-memory-"
291+
"allocation>`."
277292

278293
#: ../Doc/c-api/memory.rst:139
279294
msgid "Raw Memory Interface"
@@ -760,6 +775,8 @@ msgid ""
760775
"``mimalloc``: :ref:`mimalloc memory allocator <mimalloc>`. The pymalloc "
761776
"allocator will be used if mimalloc support isn't available."
762777
msgstr ""
778+
"``mimalloc``: :ref:`asignador de memoria mimalloc <mimalloc>`. El asignador "
779+
"pymalloc se usará si no hay compatibilidad con mimalloc."
763780

764781
# debug hooks se deja como enlaces de depuración ya que en traducciones
765782
# anteriores se dejó como enlaces
@@ -936,6 +953,9 @@ msgid ""
936953
"allocator may be called in different interpreters that do not share a "
937954
"``GIL``."
938955
msgstr ""
956+
"Para los dominios restantes, el asignador también debe ser seguro para los "
957+
"hilos: el asignador se podría llamar desde intérpretes diferentes que no "
958+
"comparten un ``GIL``."
939959

940960
#: ../Doc/c-api/memory.rst:495
941961
msgid ""
@@ -957,7 +977,7 @@ msgstr ""
957977

958978
#: ../Doc/c-api/memory.rst:504
959979
msgid ":c:func:`PyMem_SetAllocator` does have the following contract:"
960-
msgstr ""
980+
msgstr ":c:func:`PyMem_SetAllocator` tiene el contrato siguiente:"
961981

962982
#: ../Doc/c-api/memory.rst:506
963983
msgid ""
@@ -976,10 +996,14 @@ msgid ""
976996
"existing allocator. Substituting the current allocator for some other "
977997
"arbitrary one is **not supported**."
978998
msgstr ""
999+
"Si se llama después de que Python haya terminado inicializándose (después de "
1000+
"llamar :c:func:`Py_InitializeFromConfig`) el asignador **debe** envolver el "
1001+
"asignador existente. Substituyendo el asignador actual con otro arbitrario "
1002+
"**no es compatible**."
9791003

9801004
#: ../Doc/c-api/memory.rst:519
9811005
msgid "All allocators must be thread-safe."
982-
msgstr ""
1006+
msgstr "Todos los asignadores deben ser seguro para los hilos."
9831007

9841008
#: ../Doc/c-api/memory.rst:525
9851009
msgid ""
@@ -1095,9 +1119,9 @@ msgid ""
10951119
"Let *S* = ``sizeof(size_t)``. ``2*S`` bytes are added at each end of each "
10961120
"block of *N* bytes requested. The memory layout is like so, where p "
10971121
"represents the address returned by a malloc-like or realloc-like function "
1098-
"(``p[i:j]`` means the slice of bytes from ``*(p+i)`` inclusive up to "
1099-
"``*(p+j)`` exclusive; note that the treatment of negative indices differs "
1100-
"from a Python slice):"
1122+
"(``p[i:j]`` means the slice of bytes from ``*(p+i)`` inclusive up to ``*(p"
1123+
"+j)`` exclusive; note that the treatment of negative indices differs from a "
1124+
"Python slice):"
11011125
msgstr ""
11021126
"Sea *S* = ``sizeof(size_t)``. Se agregan ``2*S`` bytes en cada extremo de "
11031127
"cada bloque de *N* bytes solicitados. El diseño de la memoria es así, donde "
@@ -1371,6 +1395,10 @@ msgid ""
13711395
"performance characteristics. Initially developed by Daan Leijen for the "
13721396
"runtime systems of the Koka and Lean languages.\""
13731397
msgstr ""
1398+
"Python admite el asignador mimalloc cuando la plataforma subyacente lo "
1399+
"admite. mimalloc \"es un asignador de propósito general con excelentes "
1400+
"característicos de rendimiento. Desarrollado originalmente por Daan Leijen "
1401+
"para los sistemas de tiempo de ejecución de las lenguajes Koka y Lean\""
13741402

13751403
#: ../Doc/c-api/memory.rst:699
13761404
msgid "tracemalloc C API"
@@ -1434,6 +1462,15 @@ msgid ""
14341462
"PyMem_Free(buf); /* allocated with PyMem_Malloc */\n"
14351463
"return res;"
14361464
msgstr ""
1465+
"PyObject *res;\n"
1466+
"char *buf = (char *) PyMem_Malloc(BUFSIZ); /* for I/O */\n"
1467+
"\n"
1468+
"if (buf == NULL)\n"
1469+
" return PyErr_NoMemory();\n"
1470+
"/* ...Do some I/O operation involving buf... */\n"
1471+
"res = PyBytes_FromString(buf);\n"
1472+
"PyMem_Free(buf); /* allocated with PyMem_Malloc */\n"
1473+
"return res;"
14371474

14381475
#: ../Doc/c-api/memory.rst:738
14391476
msgid "The same code using the type-oriented function set::"
@@ -1452,6 +1489,15 @@ msgid ""
14521489
"PyMem_Del(buf); /* allocated with PyMem_New */\n"
14531490
"return res;"
14541491
msgstr ""
1492+
"PyObject *res;\n"
1493+
"char *buf = PyMem_New(char, BUFSIZ); /* for I/O */\n"
1494+
"\n"
1495+
"if (buf == NULL)\n"
1496+
" return PyErr_NoMemory();\n"
1497+
"/* ...Do some I/O operation involving buf... */\n"
1498+
"res = PyBytes_FromString(buf);\n"
1499+
"PyMem_Del(buf); /* allocated with PyMem_New */\n"
1500+
"return res;"
14551501

14561502
#: ../Doc/c-api/memory.rst:750
14571503
msgid ""
@@ -1480,6 +1526,13 @@ msgid ""
14801526
"free(buf2); /* Right -- allocated via malloc() */\n"
14811527
"free(buf1); /* Fatal -- should be PyMem_Del() */"
14821528
msgstr ""
1529+
"char *buf1 = PyMem_New(char, BUFSIZ);\n"
1530+
"char *buf2 = (char *) malloc(BUFSIZ);\n"
1531+
"char *buf3 = (char *) PyMem_Malloc(BUFSIZ);\n"
1532+
"...\n"
1533+
"PyMem_Del(buf3); /* Incorrecto -- debe ser PyMem_Free() */\n"
1534+
"free(buf2); /* Correcto -- asignado por malloc() */\n"
1535+
"free(buf1); /* Fatal -- debe ser PyMem_Del() */"
14831536

14841537
#: ../Doc/c-api/memory.rst:765
14851538
#, fuzzy
@@ -1502,16 +1555,16 @@ msgstr ""
15021555

15031556
#: ../Doc/c-api/memory.rst:43
15041557
msgid "malloc (C function)"
1505-
msgstr ""
1558+
msgstr "malloc (Función de C)"
15061559

15071560
#: ../Doc/c-api/memory.rst:43
15081561
msgid "calloc (C function)"
1509-
msgstr ""
1562+
msgstr "calloc (Función de C)"
15101563

15111564
#: ../Doc/c-api/memory.rst:43
15121565
msgid "realloc (C function)"
1513-
msgstr ""
1566+
msgstr "realloc (Función de C)"
15141567

15151568
#: ../Doc/c-api/memory.rst:43
15161569
msgid "free (C function)"
1517-
msgstr ""
1570+
msgstr "free (Función de C)"

0 commit comments

Comments
 (0)