@@ -792,14 +792,16 @@ msgstr "PYTHONMALLOC 环境变量"
792792msgid ""
793793"The new :envvar:`PYTHONMALLOC` environment variable allows setting the "
794794"Python memory allocators and installing debug hooks."
795- msgstr ""
795+ msgstr "新的 :envvar:`PYTHONMALLOC` 环境变量允许设置 Python 内存分配器并安装调试钩子。 "
796796
797797#: ../../whatsnew/3.6.rst:642
798798msgid ""
799799"It is now possible to install debug hooks on Python memory allocators on "
800800"Python compiled in release mode using ``PYTHONMALLOC=debug``. Effects of "
801801"debug hooks:"
802802msgstr ""
803+ "现在将可以使用 ``PYTHONMALLOC=debug`` 在以发布模式编译的 Python 上为 Python 内存分配器安装调试钩子。 "
804+ "调试钩子的效果:"
803805
804806#: ../../whatsnew/3.6.rst:645
805807msgid "Newly allocated memory is filled with the byte ``0xCB``"
@@ -815,6 +817,8 @@ msgid ""
815817":c:func:`PyObject_Free` called on a memory block allocated by "
816818":c:func:`PyMem_Malloc`."
817819msgstr ""
820+ "检测违反 Python 内存分配器 API 的操作。 例如,:c:func:`PyObject_Free` 在 "
821+ ":c:func:`PyMem_Malloc` 所分配的内存块上被调用。"
818822
819823#: ../../whatsnew/3.6.rst:650
820824msgid "Detect writes before the start of a buffer (buffer underflows)"
@@ -842,7 +846,7 @@ msgstr "检查是否保留了 GIL 也是Python 3.6 的新特性。"
842846msgid ""
843847"See the :c:func:`PyMem_SetupDebugHooks` function for debug hooks on Python "
844848"memory allocators."
845- msgstr ""
849+ msgstr "请参阅 :c:func:`PyMem_SetupDebugHooks` 函数来了解 Python 内存分配器上的调试钩子。 "
846850
847851#: ../../whatsnew/3.6.rst:661
848852msgid ""
@@ -851,19 +855,21 @@ msgid ""
851855"``PYTHONMALLOC=malloc``. This is helpful when using external memory "
852856"debuggers like Valgrind on a Python compiled in release mode."
853857msgstr ""
858+ "现在还可以使用 ``PYTHONMALLOC=malloc`` 为所有的 Python 内存分配强制使用 C 库的 :c:func:`malloc` "
859+ "分配器。 这在以发布模式编译的 Python 上使用外部内存调试器如 Valgrind 时会很有用处。"
854860
855861#: ../../whatsnew/3.6.rst:666
856862msgid ""
857863"On error, the debug hooks on Python memory allocators now use the "
858864":mod:`tracemalloc` module to get the traceback where a memory block was "
859865"allocated."
860- msgstr ""
866+ msgstr "发生错误时,Python 内存分配器上的调试钩子现在会使用 :mod:`tracemalloc` 模块来获取内存块被分配所在位置上的回溯。 "
861867
862868#: ../../whatsnew/3.6.rst:670
863869msgid ""
864870"Example of fatal error on buffer overflow using ``python3.6 -X "
865871"tracemalloc=5`` (store 5 frames in traces)::"
866- msgstr ""
872+ msgstr "使用 ``python3.6 -X tracemalloc=5`` (在回溯中存储 5 帧) 的缓冲区溢出的致命错误示例:: "
867873
868874#: ../../whatsnew/3.6.rst:707
869875msgid "(Contributed by Victor Stinner in :issue:`26516` and :issue:`26564`.)"
@@ -877,7 +883,7 @@ msgstr "DTrace 和 SystemTap 探测支持"
877883msgid ""
878884"Python can now be built ``--with-dtrace`` which enables static markers for "
879885"the following events in the interpreter:"
880- msgstr ""
886+ msgstr "Python 现在可以附带 ``--with-dtrace`` 来构建以便为解释器中的下列事件启用静态标记: "
881887
882888#: ../../whatsnew/3.6.rst:718
883889msgid "function call/return"
@@ -913,6 +919,8 @@ msgid ""
913919"(Contributed by Łukasz Langa in :issue:`21590`, based on patches by Jesús "
914920"Cea Avión, David Malcolm, and Nikhil Benesch.)"
915921msgstr ""
922+ "(由 Łukasz Langa 在 :issue:`21590` 中贡献,基于 Jesús Cea Avión, David Malcolm 和 "
923+ "Nikhil Benesch 的补丁。)"
916924
917925#: ../../whatsnew/3.6.rst:738
918926msgid "Other Language Changes"
0 commit comments