Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Fix PYTHONTRACEMALLOC env var behavior #12

Merged
merged 4 commits into from Oct 15, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 4 additions & 6 deletions doc/index.rst
Expand Up @@ -17,14 +17,12 @@ Python. It provides the following information:
total size, number and average size of allocated memory blocks
* Compute the differences between two snapshots to detect memory leaks

To trace most memory blocks allocated by Python, the module should be started
as early as possible by setting the :envvar:`PYTHONTRACEMALLOC` environment
variable to ``1``. The :func:`tracemalloc.start` function can be called at runtime to
start tracing Python memory allocations.
The :func:`tracemalloc.start` function can be called at runtime to start
tracing Python memory allocations. To trace most memory blocks allocated by
Python, it should be called as soon as possible.

By default, a trace of an allocated memory block only stores the most recent
frame (1 frame). To store 25 frames at startup: set the
:envvar:`PYTHONTRACEMALLOC` environment variable to ``25``.
frame (1 frame). To store 25 frames, use ``tracemalloc.start(25)``.

Websites:

Expand Down