@@ -11,7 +11,7 @@ msgid ""
11
11
msgstr ""
12
12
"Project-Id-Version : Python 3.13\n "
13
13
"Report-Msgid-Bugs-To : \n "
14
- "POT-Creation-Date : 2025-01-03 14:16 +0000\n "
14
+ "POT-Creation-Date : 2025-07-25 15:00 +0000\n "
15
15
"PO-Revision-Date : 2025-07-18 19:20+0000\n "
16
16
"Last-Translator : Rafael Fontenelle <rffontenelle@gmail.com>, 2025\n "
17
17
"Language-Team : Portuguese (Brazil) (https://app.transifex.com/python-doc/ "
@@ -591,19 +591,19 @@ msgid ""
591
591
"following fields:"
592
592
msgstr ""
593
593
594
- #: ../../c-api/memory.rst:423 ../../c-api/memory.rst:670
594
+ #: ../../c-api/memory.rst:423 ../../c-api/memory.rst:674
595
595
msgid "Field"
596
596
msgstr "Campo"
597
597
598
- #: ../../c-api/memory.rst:423 ../../c-api/memory.rst:670
598
+ #: ../../c-api/memory.rst:423 ../../c-api/memory.rst:674
599
599
msgid "Meaning"
600
600
msgstr "Significado"
601
601
602
- #: ../../c-api/memory.rst:425 ../../c-api/memory.rst:672
602
+ #: ../../c-api/memory.rst:425 ../../c-api/memory.rst:676
603
603
msgid "``void *ctx``"
604
604
msgstr "``void *ctx``"
605
605
606
- #: ../../c-api/memory.rst:425 ../../c-api/memory.rst:672
606
+ #: ../../c-api/memory.rst:425 ../../c-api/memory.rst:676
607
607
msgid "user context passed as first argument"
608
608
msgstr ""
609
609
@@ -1007,92 +1007,99 @@ msgid ""
1007
1007
"envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``)."
1008
1008
msgstr ""
1009
1009
1010
- #: ../../c-api/memory.rst:660
1010
+ #: ../../c-api/memory.rst:659
1011
+ msgid ""
1012
+ "Typically, it makes sense to disable the pymalloc allocator when building "
1013
+ "Python with AddressSanitizer (:option:`--with-address-sanitizer`) which "
1014
+ "helps uncover low level bugs within the C code."
1015
+ msgstr ""
1016
+
1017
+ #: ../../c-api/memory.rst:664
1011
1018
msgid "Customize pymalloc Arena Allocator"
1012
1019
msgstr ""
1013
1020
1014
- #: ../../c-api/memory.rst:666
1021
+ #: ../../c-api/memory.rst:670
1015
1022
msgid ""
1016
1023
"Structure used to describe an arena allocator. The structure has three "
1017
1024
"fields:"
1018
1025
msgstr ""
1019
1026
1020
- #: ../../c-api/memory.rst:674
1027
+ #: ../../c-api/memory.rst:678
1021
1028
msgid "``void* alloc(void *ctx, size_t size)``"
1022
1029
msgstr "``void* alloc(void *ctx, size_t size)``"
1023
1030
1024
- #: ../../c-api/memory.rst:674
1031
+ #: ../../c-api/memory.rst:678
1025
1032
msgid "allocate an arena of size bytes"
1026
1033
msgstr ""
1027
1034
1028
- #: ../../c-api/memory.rst:676
1035
+ #: ../../c-api/memory.rst:680
1029
1036
msgid "``void free(void *ctx, void *ptr, size_t size)``"
1030
1037
msgstr "``void free(void *ctx, void *ptr, size_t size)``"
1031
1038
1032
- #: ../../c-api/memory.rst:676
1039
+ #: ../../c-api/memory.rst:680
1033
1040
msgid "free an arena"
1034
1041
msgstr ""
1035
1042
1036
- #: ../../c-api/memory.rst:681
1043
+ #: ../../c-api/memory.rst:685
1037
1044
msgid "Get the arena allocator."
1038
1045
msgstr ""
1039
1046
1040
- #: ../../c-api/memory.rst:685
1047
+ #: ../../c-api/memory.rst:689
1041
1048
msgid "Set the arena allocator."
1042
1049
msgstr ""
1043
1050
1044
- #: ../../c-api/memory.rst:690
1051
+ #: ../../c-api/memory.rst:694
1045
1052
msgid "The mimalloc allocator"
1046
1053
msgstr ""
1047
1054
1048
- #: ../../c-api/memory.rst:694
1055
+ #: ../../c-api/memory.rst:698
1049
1056
msgid ""
1050
1057
"Python supports the mimalloc allocator when the underlying platform support "
1051
1058
"is available. mimalloc \" is a general purpose allocator with excellent "
1052
1059
"performance characteristics. Initially developed by Daan Leijen for the "
1053
1060
"runtime systems of the Koka and Lean languages.\" "
1054
1061
msgstr ""
1055
1062
1056
- #: ../../c-api/memory.rst:699
1063
+ #: ../../c-api/memory.rst:703
1057
1064
msgid "tracemalloc C API"
1058
1065
msgstr ""
1059
1066
1060
- #: ../../c-api/memory.rst:705
1067
+ #: ../../c-api/memory.rst:709
1061
1068
msgid "Track an allocated memory block in the :mod:`tracemalloc` module."
1062
1069
msgstr ""
1063
1070
1064
- #: ../../c-api/memory.rst:707
1071
+ #: ../../c-api/memory.rst:711
1065
1072
msgid ""
1066
1073
"Return ``0`` on success, return ``-1`` on error (failed to allocate memory "
1067
1074
"to store the trace). Return ``-2`` if tracemalloc is disabled."
1068
1075
msgstr ""
1069
1076
1070
- #: ../../c-api/memory.rst:710
1077
+ #: ../../c-api/memory.rst:714
1071
1078
msgid "If memory block is already tracked, update the existing trace."
1072
1079
msgstr ""
1073
1080
1074
- #: ../../c-api/memory.rst:714
1081
+ #: ../../c-api/memory.rst:718
1075
1082
msgid ""
1076
1083
"Untrack an allocated memory block in the :mod:`tracemalloc` module. Do "
1077
1084
"nothing if the block was not tracked."
1078
1085
msgstr ""
1079
1086
1080
- #: ../../c-api/memory.rst:717
1087
+ #: ../../c-api/memory.rst:721
1081
1088
msgid "Return ``-2`` if tracemalloc is disabled, otherwise return ``0``."
1082
1089
msgstr ""
1083
1090
1084
- #: ../../c-api/memory.rst:723
1091
+ #: ../../c-api/memory.rst:727
1085
1092
msgid "Examples"
1086
1093
msgstr "Exemplos"
1087
1094
1088
- #: ../../c-api/memory.rst:725
1095
+ #: ../../c-api/memory.rst:729
1089
1096
msgid ""
1090
1097
"Here is the example from section :ref:`memoryoverview`, rewritten so that "
1091
1098
"the I/O buffer is allocated from the Python heap by using the first function "
1092
1099
"set::"
1093
1100
msgstr ""
1094
1101
1095
- #: ../../c-api/memory.rst:728
1102
+ #: ../../c-api/memory.rst:732
1096
1103
msgid ""
1097
1104
"PyObject *res;\n"
1098
1105
"char *buf = (char *) PyMem_Malloc(BUFSIZ); /* for I/O */\n"
@@ -1105,11 +1112,11 @@ msgid ""
1105
1112
"return res;"
1106
1113
msgstr ""
1107
1114
1108
- #: ../../c-api/memory.rst:738
1115
+ #: ../../c-api/memory.rst:742
1109
1116
msgid "The same code using the type-oriented function set::"
1110
1117
msgstr ""
1111
1118
1112
- #: ../../c-api/memory.rst:740
1119
+ #: ../../c-api/memory.rst:744
1113
1120
msgid ""
1114
1121
"PyObject *res;\n"
1115
1122
"char *buf = PyMem_New(char, BUFSIZ); /* for I/O */\n"
@@ -1122,7 +1129,7 @@ msgid ""
1122
1129
"return res;"
1123
1130
msgstr ""
1124
1131
1125
- #: ../../c-api/memory.rst:750
1132
+ #: ../../c-api/memory.rst:754
1126
1133
msgid ""
1127
1134
"Note that in the two examples above, the buffer is always manipulated via "
1128
1135
"functions belonging to the same set. Indeed, it is required to use the same "
@@ -1132,7 +1139,7 @@ msgid ""
1132
1139
"different allocators operating on different heaps. ::"
1133
1140
msgstr ""
1134
1141
1135
- #: ../../c-api/memory.rst:757
1142
+ #: ../../c-api/memory.rst:761
1136
1143
msgid ""
1137
1144
"char *buf1 = PyMem_New(char, BUFSIZ);\n"
1138
1145
"char *buf2 = (char *) malloc(BUFSIZ);\n"
@@ -1143,14 +1150,14 @@ msgid ""
1143
1150
"free(buf1); /* Fatal -- should be PyMem_Del() */"
1144
1151
msgstr ""
1145
1152
1146
- #: ../../c-api/memory.rst:765
1153
+ #: ../../c-api/memory.rst:769
1147
1154
msgid ""
1148
1155
"In addition to the functions aimed at handling raw memory blocks from the "
1149
1156
"Python heap, objects in Python are allocated and released with :c:macro:"
1150
1157
"`PyObject_New`, :c:macro:`PyObject_NewVar` and :c:func:`PyObject_Del`."
1151
1158
msgstr ""
1152
1159
1153
- #: ../../c-api/memory.rst:769
1160
+ #: ../../c-api/memory.rst:773
1154
1161
msgid ""
1155
1162
"These will be explained in the next chapter on defining and implementing new "
1156
1163
"object types in C."
0 commit comments