diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-04-11 17:33:27 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-04-11 17:33:27 +0300 |
commit | 4f3e27aea93c97461c2e5727ace32073630909eb (patch) | |
tree | 368ae9727c437e1679a37519339da8343edaea03 /Doc/using | |
parent | a22afd7d172f04d7337aee06e56cba02acd2626a (diff) | |
parent | cf42d9bb0065d68804251d6ee7594cd1d0ecb76f (diff) | |
download | cpython-4f3e27aea93c97461c2e5727ace32073630909eb.tar.gz |
Issue #25910: Fixed more links in the docs.
Diffstat (limited to 'Doc/using')
-rw-r--r-- | Doc/using/cmdline.rst | 55 | ||||
-rw-r--r-- | Doc/using/mac.rst | 6 |
2 files changed, 52 insertions, 9 deletions
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index ec744a351d..c1c700cc4b 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -621,6 +621,55 @@ conflict. .. versionadded:: 3.4 +.. envvar:: PYTHONMALLOC + + Set the Python memory allocators and/or install debug hooks. + + Set the family of memory allocators used by Python: + + * ``malloc``: use the :c:func:`malloc` function of the C library + for all Python memory allocators (ex: :c:func:`PyMem_RawMalloc`, + :c:func:`PyMem_Malloc` and :c:func:`PyObject_Malloc`). + * ``pymalloc``: :c:func:`PyObject_Malloc`, :c:func:`PyObject_Calloc` and + :c:func:`PyObject_Realloc` use the :ref:`pymalloc allocator <pymalloc>`. + Other Python memory allocators (ex: :c:func:`PyMem_RawMalloc` and + :c:func:`PyMem_Malloc`) use :c:func:`malloc`. + + Install debug hooks: + + * ``debug``: install debug hooks on top of the default memory allocator + * ``malloc_debug``: same as ``malloc`` but also install debug hooks + * ``pymalloc_debug``: same as ``pymalloc`` but also install debug hooks + + When Python is compiled in release mode, the default is ``pymalloc``. When + compiled in debug mode, the default is ``pymalloc_debug`` and the debug hooks + are used automatically. + + If Python is configured without ``pymalloc`` support, ``pymalloc`` and + ``pymalloc_debug`` are not available, the default is ``malloc`` in release + mode and ``malloc_debug`` in debug mode. + + See the :c:func:`PyMem_SetupDebugHooks` function for debug hooks on Python + memory allocators. + + .. versionadded:: 3.6 + + +.. envvar:: PYTHONMALLOCSTATS + + If set to a non-empty string, Python will print statistics of the + :ref:`pymalloc memory allocator <pymalloc>` every time a new pymalloc object + arena is created, and on shutdown. + + This variable is ignored if the :envvar:`PYTHONMALLOC` environment variable + is used to force the :c:func:`malloc` allocator of the C library, or if + Python is configured without ``pymalloc`` support. + + .. versionchanged:: 3.6 + This variable can now also be used on Python compiled in release mode. + It now has no effect if set to an empty string. + + Debug-mode variables ~~~~~~~~~~~~~~~~~~~~ @@ -636,9 +685,3 @@ if Python was configured with the ``--with-pydebug`` build option. If set, Python will dump objects and reference counts still alive after shutting down the interpreter. - - -.. envvar:: PYTHONMALLOCSTATS - - If set, Python will print memory allocation statistics every time a new - object arena is created, and on shutdown. diff --git a/Doc/using/mac.rst b/Doc/using/mac.rst index 0352648207..35d5240051 100644 --- a/Doc/using/mac.rst +++ b/Doc/using/mac.rst @@ -25,7 +25,7 @@ there. What you get after installing is a number of things: -* A :file:`MacPython 3.5` folder in your :file:`Applications` folder. In here +* A :file:`MacPython 3.6` folder in your :file:`Applications` folder. In here you find IDLE, the development environment that is a standard part of official Python distributions; PythonLauncher, which handles double-clicking Python scripts from the Finder; and the "Build Applet" tool, which allows you to @@ -93,7 +93,7 @@ aware of: programs that talk to the Aqua window manager (in other words, anything that has a GUI) need to be run in a special way. Use :program:`pythonw` instead of :program:`python` to start such scripts. -With Python 3.5, you can use either :program:`python` or :program:`pythonw`. +With Python 3.6, you can use either :program:`python` or :program:`pythonw`. Configuration @@ -159,7 +159,7 @@ https://riverbankcomputing.com/software/pyqt/intro. Distributing Python Applications on the Mac =========================================== -The "Build Applet" tool that is placed in the MacPython 3.5 folder is fine for +The "Build Applet" tool that is placed in the MacPython 3.6 folder is fine for packaging small Python scripts on your own machine to run as a standard Mac application. This tool, however, is not robust enough to distribute Python applications to other users. |