[Python-checkins] cpython: Mention the new tracemalloc module in the What's New in Python 3.4 document

victor.stinner python-checkins at python.org
Mon Nov 25 09:40:37 CET 2013


http://hg.python.org/cpython/rev/13e47495a7be
changeset:   87552:13e47495a7be
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Mon Nov 25 09:40:27 2013 +0100
summary:
  Mention the new tracemalloc module in the What's New in Python 3.4 document

files:
  Doc/whatsnew/3.4.rst |  18 ++++++++++++++++++
  1 files changed, 18 insertions(+), 0 deletions(-)


diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -97,6 +97,7 @@
 * :mod:`selectors`: High-level and efficient I/O multiplexing, built upon the
   :mod:`select` module primitives.
 * :mod:`statistics`: A basic numerically stable statistics library (:pep:`450`).
+* :mod:`tracemalloc`: Trace Python memory allocations (:pep:`454`).
 
 New expected features for Python implementations:
 
@@ -400,6 +401,23 @@
       PEP written and implemented by Steven D'Aprano
 
 
+tracemalloc
+-----------
+
+The new :mod:`tracemalloc` module (defined in :pep:`454`) is a debug tool to
+trace memory blocks allocated by Python. It provides the following information:
+
+* Traceback where an object was allocated
+* Statistics on allocated memory blocks per filename and per line number:
+  total size, number and average size of allocated memory blocks
+* Compute the differences between two snapshots to detect memory leaks
+
+.. seealso::
+
+   :pep:`454` - Add a new tracemalloc module to trace Python memory allocations
+      PEP written and implemented by Victor Stinner
+
+
 Improved Modules
 ================
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list