8
8
msgstr ""
9
9
"Project-Id-Version : Python 3.12\n "
10
10
"Report-Msgid-Bugs-To : \n "
11
- "POT-Creation-Date : 2023-08-01 00:03+0000\n "
11
+ "POT-Creation-Date : 2023-10-17 00:03+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- "
@@ -557,19 +557,19 @@ msgid ""
557
557
"following fields:"
558
558
msgstr ""
559
559
560
- #: ../../c-api/memory.rst:411 ../../c-api/memory.rst:657
560
+ #: ../../c-api/memory.rst:411 ../../c-api/memory.rst:658
561
561
msgid "Field"
562
562
msgstr ""
563
563
564
- #: ../../c-api/memory.rst:411 ../../c-api/memory.rst:657
564
+ #: ../../c-api/memory.rst:411 ../../c-api/memory.rst:658
565
565
msgid "Meaning"
566
566
msgstr ""
567
567
568
- #: ../../c-api/memory.rst:413 ../../c-api/memory.rst:659
568
+ #: ../../c-api/memory.rst:413 ../../c-api/memory.rst:660
569
569
msgid "``void *ctx``"
570
570
msgstr "``void *ctx``"
571
571
572
- #: ../../c-api/memory.rst:413 ../../c-api/memory.rst:659
572
+ #: ../../c-api/memory.rst:413 ../../c-api/memory.rst:660
573
573
msgid "user context passed as first argument"
574
574
msgstr ""
575
575
@@ -938,119 +938,119 @@ msgstr ""
938
938
msgid ""
939
939
"Python has a *pymalloc* allocator optimized for small objects (smaller or "
940
940
"equal to 512 bytes) with a short lifetime. It uses memory mappings called "
941
- "\" arenas\" with a fixed size of 256 KiB. It falls back to :c:func: "
942
- "`PyMem_RawMalloc` and :c:func:`PyMem_RawRealloc` for allocations larger than "
943
- "512 bytes."
941
+ "\" arenas\" with a fixed size of either 256 KiB on 32-bit platforms or 1 MiB "
942
+ "on 64-bit platforms. It falls back to :c:func:`PyMem_RawMalloc` and :c:func: "
943
+ "`PyMem_RawRealloc` for allocations larger than 512 bytes."
944
944
msgstr ""
945
945
946
- #: ../../c-api/memory.rst:632
946
+ #: ../../c-api/memory.rst:633
947
947
msgid ""
948
948
"*pymalloc* is the :ref:`default allocator <default-memory-allocators>` of "
949
949
"the :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) and :c:macro:"
950
950
"`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) domains."
951
951
msgstr ""
952
952
953
- #: ../../c-api/memory.rst:636
953
+ #: ../../c-api/memory.rst:637
954
954
msgid "The arena allocator uses the following functions:"
955
955
msgstr ""
956
956
957
- #: ../../c-api/memory.rst:638
957
+ #: ../../c-api/memory.rst:639
958
958
msgid ":c:func:`!VirtualAlloc` and :c:func:`!VirtualFree` on Windows,"
959
959
msgstr ""
960
960
961
- #: ../../c-api/memory.rst:639
961
+ #: ../../c-api/memory.rst:640
962
962
msgid ":c:func:`!mmap` and :c:func:`!munmap` if available,"
963
963
msgstr ""
964
964
965
- #: ../../c-api/memory.rst:640
965
+ #: ../../c-api/memory.rst:641
966
966
msgid ":c:func:`malloc` and :c:func:`free` otherwise."
967
967
msgstr ""
968
968
969
- #: ../../c-api/memory.rst:642
969
+ #: ../../c-api/memory.rst:643
970
970
msgid ""
971
971
"This allocator is disabled if Python is configured with the :option:`--"
972
972
"without-pymalloc` option. It can also be disabled at runtime using the :"
973
973
"envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``)."
974
974
msgstr ""
975
975
976
- #: ../../c-api/memory.rst:647
976
+ #: ../../c-api/memory.rst:648
977
977
msgid "Customize pymalloc Arena Allocator"
978
978
msgstr ""
979
979
980
- #: ../../c-api/memory.rst:653
980
+ #: ../../c-api/memory.rst:654
981
981
msgid ""
982
982
"Structure used to describe an arena allocator. The structure has three "
983
983
"fields:"
984
984
msgstr ""
985
985
986
- #: ../../c-api/memory.rst:661
986
+ #: ../../c-api/memory.rst:662
987
987
msgid "``void* alloc(void *ctx, size_t size)``"
988
988
msgstr "``void* alloc(void *ctx, size_t size)``"
989
989
990
- #: ../../c-api/memory.rst:661
990
+ #: ../../c-api/memory.rst:662
991
991
msgid "allocate an arena of size bytes"
992
992
msgstr ""
993
993
994
- #: ../../c-api/memory.rst:663
994
+ #: ../../c-api/memory.rst:664
995
995
msgid "``void free(void *ctx, void *ptr, size_t size)``"
996
996
msgstr "``void free(void *ctx, void *ptr, size_t size)``"
997
997
998
- #: ../../c-api/memory.rst:663
998
+ #: ../../c-api/memory.rst:664
999
999
msgid "free an arena"
1000
1000
msgstr ""
1001
1001
1002
- #: ../../c-api/memory.rst:668
1002
+ #: ../../c-api/memory.rst:669
1003
1003
msgid "Get the arena allocator."
1004
1004
msgstr ""
1005
1005
1006
- #: ../../c-api/memory.rst:672
1006
+ #: ../../c-api/memory.rst:673
1007
1007
msgid "Set the arena allocator."
1008
1008
msgstr ""
1009
1009
1010
- #: ../../c-api/memory.rst:676
1010
+ #: ../../c-api/memory.rst:677
1011
1011
msgid "tracemalloc C API"
1012
1012
msgstr ""
1013
1013
1014
- #: ../../c-api/memory.rst:682
1014
+ #: ../../c-api/memory.rst:683
1015
1015
msgid "Track an allocated memory block in the :mod:`tracemalloc` module."
1016
1016
msgstr ""
1017
1017
1018
- #: ../../c-api/memory.rst:684
1018
+ #: ../../c-api/memory.rst:685
1019
1019
msgid ""
1020
1020
"Return ``0`` on success, return ``-1`` on error (failed to allocate memory "
1021
1021
"to store the trace). Return ``-2`` if tracemalloc is disabled."
1022
1022
msgstr ""
1023
1023
1024
- #: ../../c-api/memory.rst:687
1024
+ #: ../../c-api/memory.rst:688
1025
1025
msgid "If memory block is already tracked, update the existing trace."
1026
1026
msgstr ""
1027
1027
1028
- #: ../../c-api/memory.rst:691
1028
+ #: ../../c-api/memory.rst:692
1029
1029
msgid ""
1030
1030
"Untrack an allocated memory block in the :mod:`tracemalloc` module. Do "
1031
1031
"nothing if the block was not tracked."
1032
1032
msgstr ""
1033
1033
1034
- #: ../../c-api/memory.rst:694
1034
+ #: ../../c-api/memory.rst:695
1035
1035
msgid "Return ``-2`` if tracemalloc is disabled, otherwise return ``0``."
1036
1036
msgstr ""
1037
1037
1038
- #: ../../c-api/memory.rst:700
1038
+ #: ../../c-api/memory.rst:701
1039
1039
msgid "Examples"
1040
1040
msgstr "範例"
1041
1041
1042
- #: ../../c-api/memory.rst:702
1042
+ #: ../../c-api/memory.rst:703
1043
1043
msgid ""
1044
1044
"Here is the example from section :ref:`memoryoverview`, rewritten so that "
1045
1045
"the I/O buffer is allocated from the Python heap by using the first function "
1046
1046
"set::"
1047
1047
msgstr ""
1048
1048
1049
- #: ../../c-api/memory.rst:715
1049
+ #: ../../c-api/memory.rst:716
1050
1050
msgid "The same code using the type-oriented function set::"
1051
1051
msgstr ""
1052
1052
1053
- #: ../../c-api/memory.rst:727
1053
+ #: ../../c-api/memory.rst:728
1054
1054
msgid ""
1055
1055
"Note that in the two examples above, the buffer is always manipulated via "
1056
1056
"functions belonging to the same set. Indeed, it is required to use the same "
@@ -1060,14 +1060,14 @@ msgid ""
1060
1060
"different allocators operating on different heaps. ::"
1061
1061
msgstr ""
1062
1062
1063
- #: ../../c-api/memory.rst:742
1063
+ #: ../../c-api/memory.rst:743
1064
1064
msgid ""
1065
1065
"In addition to the functions aimed at handling raw memory blocks from the "
1066
1066
"Python heap, objects in Python are allocated and released with :c:macro:"
1067
1067
"`PyObject_New`, :c:macro:`PyObject_NewVar` and :c:func:`PyObject_Del`."
1068
1068
msgstr ""
1069
1069
1070
- #: ../../c-api/memory.rst:746
1070
+ #: ../../c-api/memory.rst:747
1071
1071
msgid ""
1072
1072
"These will be explained in the next chapter on defining and implementing new "
1073
1073
"object types in C."
0 commit comments