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