Skip to content

These scripts are written to demonstrate the process of Python Memory Allocation, Partitioning and Mapping. The Python ‘tracemalloc’ module is used to trace memory allocations. The tracemalloc module is a debug tool to trace memory blocks allocated by Python. It provides the following information: > Traceback where an object was allocated. > Sta…

VakinduPhilliam/Python_Memory_Architecture

Repository files navigation

Python_Memory_Architecture

These scripts are written to demonstrate the process of Python Memory Allocation, Partitioning and Mapping. The Python ‘tracemalloc’ module is used to trace memory allocations. The tracemalloc module is a debug tool to trace memory blocks allocated by Python.
It provides the following information:

Traceback where an object was allocated.

Statistics on allocated memory blocks per filename and per line number: 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 PYTHONTRACEMALLOC environment variable to 1, or by using -X tracemalloc command line option.

The tracemalloc.start() function can be called at runtime to start tracing Python memory allocations.

New CPython memory scripts.

Compiled and presented by Vakindu Philliam.

About

These scripts are written to demonstrate the process of Python Memory Allocation, Partitioning and Mapping. The Python ‘tracemalloc’ module is used to trace memory allocations. The tracemalloc module is a debug tool to trace memory blocks allocated by Python. It provides the following information: > Traceback where an object was allocated. > Sta…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published