@@ -598,7 +598,7 @@ msgstr "``void* realloc(void *ctx, void *ptr, size_t new_size)``"
598598
599599#: ../../c-api/memory.rst:377
600600msgid "allocate or resize a memory block"
601- msgstr ""
601+ msgstr "分配一个内存块或调整其大小 "
602602
603603#: ../../c-api/memory.rst:379
604604msgid "``void free(void *ctx, void *ptr)``"
@@ -613,10 +613,12 @@ msgid ""
613613"The :c:type:`PyMemAllocator` structure was renamed to "
614614":c:type:`PyMemAllocatorEx` and a new ``calloc`` field was added."
615615msgstr ""
616+ " :c:type:`PyMemAllocator` 结构被重命名为 :c:type:`PyMemAllocatorEx` 并且添加了一个字段 "
617+ "``calloc`` 。"
616618
617619#: ../../c-api/memory.rst:389
618620msgid "Enum used to identify an allocator domain. Domains:"
619- msgstr ""
621+ msgstr "用来识别分配器域的枚举类。域有: "
620622
621623#: ../../c-api/memory.rst:393 ../../c-api/memory.rst:402
622624#: ../../c-api/memory.rst:411
@@ -673,35 +675,39 @@ msgstr ":c:func:`PyObject_Free`"
673675
674676#: ../../c-api/memory.rst:420
675677msgid "Get the memory block allocator of the specified domain."
676- msgstr ""
678+ msgstr "获取指定域的内存块分配器。 "
677679
678680#: ../../c-api/memory.rst:425
679681msgid "Set the memory block allocator of the specified domain."
680- msgstr ""
682+ msgstr "设置指定域的内存块分配器。 "
681683
682684#: ../../c-api/memory.rst:427
683685msgid ""
684686"The new allocator must return a distinct non-``NULL`` pointer when "
685687"requesting zero bytes."
686- msgstr ""
688+ msgstr "当请求零字节时,新的分配器必须返回一个独特的非 ``NULL`` 指针。 "
687689
688690#: ../../c-api/memory.rst:430
689691msgid ""
690692"For the :c:data:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-"
691693"safe: the :term:`GIL <global interpreter lock>` is not held when the "
692694"allocator is called."
693695msgstr ""
696+ "对于 :c:data:`PYMEM_DOMAIN_RAW` 域,分配器必须是线程安全的:当分配器被调用时,不持有 :term:`全局解释器锁 "
697+ "<global interpreter lock>` 。"
694698
695699#: ../../c-api/memory.rst:434
696700msgid ""
697701"If the new allocator is not a hook (does not call the previous allocator), "
698702"the :c:func:`PyMem_SetupDebugHooks` function must be called to reinstall the"
699703" debug hooks on top on the new allocator."
700704msgstr ""
705+ "如果新的分配器不是钩子(不调用之前的分配器),必须调用 :c:func:`PyMem_SetupDebugHooks` "
706+ "函数在新分配器上重新安装调试钩子。"
701707
702708#: ../../c-api/memory.rst:441
703709msgid "Setup hooks to detect bugs in the Python memory allocator functions."
704- msgstr ""
710+ msgstr "设置检测 Python 内存分配器函数中错误的钩子。 "
705711
706712#: ../../c-api/memory.rst:443
707713msgid ""
0 commit comments