Memray

Latest version: v1.12.0

Safety actively analyzes 625010 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

1.12.0

--------------------------

Features
~~~~~~~~

- Allow ``--temporal`` and ``--max-memory-records`` to be used with our :ref:`Jupyter magic <Jupyter integration>`. (538)
- Automatically use aggregated capture files for the :ref:`Jupyter magic <Jupyter integration>` whenever possible, reducing the amount of disk space needed for temporary files. (538)
- Expose the main thread id in the FileReader's metadata attribute. (560)


Bug Fixes
~~~~~~~~~

- Fix a bug that was causing ``dlopen`` to not load shared libraries that have an RPATH/RUNPATH set. (525)
- Fix a bug where the tree reporter would fail to populate the code pane with relevant lines if the line where the allocation occurred was too near the start of the file. (544)
- Fix a bug causing the first entry of ``sys.path`` to be erroneously overwritten by ``memray run`` when the Python interpreter was launched with the ``-I`` or ``-P`` flag, or when the ``PYTHONSAFEPATH`` environment variable was set. (552)

1.11.0

--------------------------

Features
~~~~~~~~

- Migrate the :doc:`live TUI <live>` to Textual. This provides a greatly improved user experience, including the ability to scroll to view rows that don't fit on the screen. (274)
- Add a new documentation page to serve as :ref:`an overview of memory concepts <memory overview>`, to help users better interpret the memory profiles provided by Memray. (496)
- Where possible, leverage ``pkg-config`` when building the extension from source, picking up appropriate compiler and linker flags automatically. (498)
- Port the tree reporter to be an interactive Textual App. (499)


Bug Fixes
~~~~~~~~~

- Fixed a bug that caused ``memray attach`` to fail with newer LLDB versions, including on macOS Sonoma. (490)
- Limit the number of memory records displayed in reporters by default. This will help displaying flamegraphs for long capture sessions. (491)
- When generating a ``--leaks`` flamegraph, don't show a warning that the ``pymalloc`` allocator is in use if ``--trace-python-allocators`` was used when generating the capture file. (492)
- Ensure that we update our terminal progress bars to 100% when processing finishes. (494)

1.10.0

--------------------------

Features
~~~~~~~~

- Add support for :ref:`inverted flame graphs`. In an inverted flame graph, the
roots are the functions that allocated memory, and the children of any given
node represent the percentage of that node's allocations that can be attributed
to a particular caller. The inverted flame graph is very helpful in analyzing
where memory is being spent in aggregate. You can generate one by passing the
``--inverted`` flag to ``memray flamegraph``. (439)
- ``memray attach`` now supports ``--aggregate`` to produce :ref:`aggregated capture files <aggregated capture files>`. (455)
- ``memray attach`` has been enhanced to allow tracking for only a set period of
time. (458)
- A new ``memray detach`` command allows you to manually deactivate tracking that
was started by a previous call to ``memray attach``. (458)
- Python 3.12 is now supported. (474)


Bug Fixes
~~~~~~~~~

- Update ``memray attach`` on Linux to prefer GDB over LLDB for injecting itself into the process being attached to. We've had several reports of problems with the Linux LLDB, and hope this change will help give Linux users a better experience by default. You can still explicitly use LLDB on Linux even when GDB is detected by running ``memray attach --method=lldb``. (449)
- Fix a memory leak in Memray itself when many different capture files are opened by a single Memray process and native stacks are being reported. This issue primarily affected ``pytest-memray``. (473)
- Fix a crash in MacOS Sonoma when using system Framework libraries, like when using the ``pyobjc`` library. (477)

1.9.1

-------------------------

Bug Fixes
~~~~~~~~~

- Fix an issue that stopped Memray's experimental support for ``greenlet`` from working with versions of the ``greenlet`` module older than 1.0. (432)
- Fix a bug leading to a deadlock when Memray is used to profile an application that uses the jemalloc implementation of ``malloc``. (433)
- Fix a bug causing the ``summary`` reporter to generate empty reports. (435)

1.9.0

-------------------------

Features
~~~~~~~~

- Allow to report the current version of Memray via a ``--version/-V`` command line parameter (420)
- Add pause/unpause keybindings to the live reporter that allows the user to pause the live reporter to analyse the current results without pausing the running program (418)


Bug Fixes
~~~~~~~~~

- Support building with Cython 3 (425)

1.8.1

-------------------------

Features
~~~~~~~~

- When the high water mark being shown by a temporal flame graph is before the first memory snapshot or after the last one, tell the user so by highlighting a region beyond the end of the memory usage plot. (399)


Bug Fixes
~~~~~~~~~

- Prevent a totally empty memory plot from being shown on flame graphs when the tracked process completes before any periodic memory snapshots are captured. (399)
- Fix a bug that prevented the temporal high water mark flame graph from showing the flame graph of a high water mark that occurred after the final periodic memory snapshot was captured. (399)
- Fix a bug that prevented Memray from intercepting functions in shared objects that are part of the dyld shared cache in macOS Ventura. (401)

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.