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

tracemalloc.get_tracemalloc_memory

Prev: tracemalloc.get_traced_memory | Up: tracemalloc | Next: tracemalloc.is_tracing
Rel: tracemalloc.BaseFilter, tracemalloc.clear_traces, tracemalloc.DomainFilter, tracemalloc.Filter
Ref: docs.python.org — tracemalloc.get_tracemalloc_memory
Tags: #public #python3 #stdlib #tracemalloc


Import

import tracemalloc
from tracemalloc import get_tracemalloc_memory

Signature & Overview

tracemalloc.get_tracemalloc_memory()

Get the memory usage in bytes of the tracemalloc module.

Usage

import tracemalloc

tracemalloc.start()
try:
    assert tracemalloc.get_tracemalloc_memory() >= 0
finally:
    tracemalloc.stop()

Gotchas

REPL Inspect

from tracemalloc import get_tracemalloc_memory
help(get_tracemalloc_memory)

Linked from

Related notes