diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-03-18 11:04:31 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-03-18 11:04:31 +0100 |
commit | a4cd8040a48df6d07017603ee0604ad85198761a (patch) | |
tree | 9b4b28fb90c0599769d88ce6f22364b36f171dc9 /Doc/using | |
parent | 4b4d5387410bfce6964023e8130f1bd98bba8426 (diff) | |
download | cpython-a4cd8040a48df6d07017603ee0604ad85198761a.tar.gz |
Enhance documentation on malloc debug hooks
Issue #26564, #26516, #26563.
Diffstat (limited to 'Doc/using')
-rw-r--r-- | Doc/using/cmdline.rst | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index 684ccb63de..45559825b4 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -638,16 +638,20 @@ conflict. Install debug hooks: * ``debug``: install debug hooks on top of the default memory allocator - * ``malloc_debug``: same than ``malloc`` but also install debug hooks - * ``pymalloc_debug``: same than ``malloc`` but also install debug hooks + * ``malloc_debug``: same as ``malloc`` but also install debug hooks + * ``pymalloc_debug``: same as ``pyalloc`` but also install debug hooks + + When is compiled in release mode, the default is ``pymalloc``. When Python + is compiled in debug mode, the default is ``pymalloc_debug``: debug hooks + are installed. + + 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. - .. note:: - ``pymalloc`` and ``pymalloc_debug`` are not available if Python is - configured without ``pymalloc`` support. - .. versionadded:: 3.6 |