On this page
  1. tracemalloc.start
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

tracemalloc.start

Prev: tracemalloc.Snapshot | Up: tracemalloc | Next: tracemalloc.Statistic
Rel: tracemalloc.BaseFilter, tracemalloc.clear_traces, tracemalloc.DomainFilter, tracemalloc.Filter
Ref: docs.python.org — tracemalloc.start
Tags: #public #python3 #stdlib #tracemalloc


Import

import tracemalloc
from tracemalloc import start

Signature & Overview

tracemalloc.start(nframe=1, /)

Start tracing Python memory allocations.

Usage

import tracemalloc

tracemalloc.start(5)
try:
    assert tracemalloc.is_tracing() is True
finally:
    tracemalloc.stop()

Gotchas

REPL Inspect

from tracemalloc import start
help(start)

Linked from

Related notes