On this page
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
- Reports
tracemalloc's own internal overhead in bytes.
REPL Inspect
from tracemalloc import get_tracemalloc_memory
help(get_tracemalloc_memory)
Linked from
Related notes
- tuts/python3/stdlib_module/tracemalloc/get_traced_memory Linked here; links to this page; shared tags: #stdlib, #tracemalloc
- tuts/python3/stdlib_module/tracemalloc/is_tracing Linked here; links to this page; shared tags: #stdlib, #tracemalloc
- tuts/python3/stdlib_module/tracemalloc Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/tracemalloc/BaseFilter Linked here; shared tags: #stdlib, #tracemalloc
- tuts/python3/stdlib_module/tracemalloc/clear_traces Linked here; shared tags: #stdlib, #tracemalloc
- tuts/python3/stdlib_module/tracemalloc/DomainFilter Linked here; shared tags: #stdlib, #tracemalloc
- tuts/python3/stdlib_module/tracemalloc/Filter Linked here; shared tags: #stdlib, #tracemalloc
- tuts/python3/stdlib_module/tracemalloc/Frame shared tags: #stdlib, #tracemalloc
- tuts/python3/stdlib_module/tracemalloc/get_object_traceback shared tags: #stdlib, #tracemalloc
- tuts/python3/stdlib_module/tracemalloc/get_traceback_limit shared tags: #stdlib, #tracemalloc