Staging: this is not the live site, pydocs.org.
tracemalloc
The tracemalloc module is a debug tool to trace memory blocks allocated by Python. It provides the following information:
© Python Software Foundation. PSF License Version 2 · Official docs ↗
Symbols in tracemalloc
c
- clear_traces
- Clear traces of memory blocks allocated by Python.
d
- DomainFilter
- Filter traces of memory blocks by their address space (domain).
f
- Filter
- Filter on traces of memory blocks.
- Frame
- Frame of a traceback.
g
- get_traced_memory
- Get the current size and peak size of memory blocks traced by tracemalloc.
i
- is_tracing
- Return True if the tracemalloc module is tracing Python memory allocations.
r
- reset_peak
- Set the peak size of memory blocks traced by tracemalloc to the current size.
s
- Snapshot
- Snapshot of traces of memory blocks allocated by Python.
- start
- Start tracing Python memory allocations.
- Statistic
- Statistic difference on memory allocations between two Snapshot instance.
- StatisticDiff
- Statistic difference on memory allocations between an old and a new Snapshot instance.
- stop
- Stop tracing Python memory allocations.
t
- take_snapshot
- Take a snapshot of traces of memory blocks allocated by Python.
- Trace
- Trace of a memory block.
- Traceback
- Sequence of Frame instances sorted from the oldest frame to the most recent frame.