{"full_name":"bloomberg/memray","owner":"bloomberg","name":"memray","shard":"1","url":"https://github.com/bloomberg/memray","description":"Memray is a memory profiler for Python","homepage":"https://bloomberg.github.io/memray/","topics":["memory","memory-leak","memory-leak-detection","memory-profiler","profiler","python","python3","hacktoberfest"],"tag_pages":["hacktoberfest","memory","profiler","python","python3"],"language":"Python","license":"Apache-2.0","avatar":"https://avatars.githubusercontent.com/u/1416818?v=4","created_at":"2022-04-08T18:04:11Z","pushed_at":"2026-11-12T19:08:42Z","metrics":{"stars":15418,"forks":489,"watchers":62,"issues":291,"prs":688,"releases":35,"issues_open":34,"issues_closed":257,"prs_open":20,"prs_closed":96,"prs_merged":572,"discussions":98},"growth":{"day":{"stars":1,"forks":1,"base_day":"2026-11-15"}},"history":{"dates":["2026-11-10","2026-11-11","2026-11-12","2026-11-13","2026-11-14","2026-11-15","2026-11-16"],"stars":[15415,15418,15417,15418,15418,15417,15418],"forks":[486,487,487,487,488,488,489],"watchers":[null,61,61,61,61,61,62],"issues_open":[null,34,34,34,34,34,34],"prs_open":[null,18,18,17,19,19,20]},"boards":{},"same_owner":[],"issues":[{"number":577,"title":"Making memray third-party allocator-aware","comments":25,"created_at":"2024-04-10T08:39:42Z"},{"number":557,"title":"Move the runner into a separate package with minimal dependencies","comments":10,"created_at":"2024-03-03T15:37:06Z"},{"number":802,"title":"Allocation record processing fails while trying to calculate the high watermark of a 1.5+ GB bin output file","comments":9,"created_at":"2025-07-30T08:58:12Z"},{"number":779,"title":"Disjoint stacks with embedded Python interpreter","comments":9,"created_at":"2025-06-10T13:49:01Z"},{"number":829,"title":"Attaching to a running compiled & cythonized app","comments":6,"created_at":"2025-09-25T09:10:35Z"},{"number":997,"title":"Stabilize temporal allocation records as a public API","comments":5,"created_at":"2026-08-14T00:21:52Z"},{"number":39,"title":"Remote monitoring configurable host","comments":5,"created_at":"2022-04-21T18:38:34Z"},{"number":1007,"title":"Make hook-reachable C++ independent from the process allocator","comments":4,"created_at":"2026-08-28T15:09:33Z"}],"discussions":[{"number":1088,"title":"How to deal with large capture files?","comments":0,"category":"General","created_at":"2026-11-13T04:00:09Z"},{"number":992,"title":"v1.20.0","comments":0,"category":"Announcements","created_at":"2026-08-07T19:25:00Z"},{"number":951,"title":"Single flame graph output for multiprocessing?","comments":1,"category":"Q&A","created_at":"2026-06-15T09:10:24Z"},{"number":869,"title":"It seems that `memray attach` is not correctly tracking all new allocated memory.","comments":1,"category":"Q&A","created_at":"2026-01-21T04:34:25Z"},{"number":868,"title":"Mimalloc","comments":1,"category":"Q&A","created_at":"2026-01-15T02:23:17Z"},{"number":864,"title":"Memray for Windows?","comments":1,"category":"General","created_at":"2025-12-30T13:52:40Z"},{"number":858,"title":"Tracker context vs --aggregate CLI option","comments":1,"category":"Q&A","created_at":"2025-11-24T09:56:46Z"},{"number":852,"title":"Using Memray for profiling distributed data processing pipelines.","comments":2,"category":"Q&A","created_at":"2025-11-13T00:45:07Z"}],"latest_release":{"name":"v1.20.0","tag":"v1.20.0","published_at":"2026-08-07T19:25:00Z","body":"## What's Changed\r\n### Features\r\n\r\n- Add a light/dark theme toggle to the flame graph and table HTML reports, which respects the system color scheme and remembers the user's choice. (#650)\r\n- Recognize deallocations performed with the `free_sized` and `free_aligned_sized` functions introduced in C23. (#725)\r\n- Improve error reporting after a failure to record a memory capture by logging the reported error string and including it in the exception message. (#747)\r\n- Add a `--buffered-file-io` option to `memray run` (and a `buffered=True` argument to `memray.FileDestination`) that writes the capture file using buffered `write` calls instead of the default memory-mapped file IO. This is useful on filesystems that don't support shared writable `mmap`, though it's slower and less robust to crashes. (#748)\r\n- Add per-module allocation statistics to `memray stats`, showing the top allocating non-stdlib modules by size and by number of allocations. (#765)\r\n- When `memray attach -o` is used with `--duration`, print a message clarifying that tracking continues in the target process after the command exits, and how to stop it early with `memray detach`. (#831)\r\n- Add a `speedscope` output format for `memray transform`. (#899)\r\n- Python 3.15 is now supported. (#920)\r\n- Added a `--confidential-files` option to `memray flamegraph` to control whether source code lines are embedded in the generated report. By default, Memray uses heuristics to guess whether each file is likely to contain secrets, and omits source lines from files that might. You can use `--confidential-files=all` to omit all source lines, or `--confidential-files=none` to include source lines from every file. See the docs on [confidential source lines](https://bloomberg.github.io/memray/flamegraph.html#confidential-source-lines) for more information. (#983)\r\n\r\n\r\n### Deprecations and Removals\r\n\r\n- Memray no longer provides an entry point named `memray3.N` (where \"3.N\" is the Python version that Memray was installed for). You can use `python3.N -m memray` instead. (#673)\r\n- Drop integration with 0.x versions of the `greenlet` module (which are from 2020 or earlier). (#908)\r\n- Drop support for Python 3.7, which reached end-of-life in June 2023. (#946)\r\n- Drop support for Python 3.8, which reached end-of-life in October 2024. (#946)\r\n\r\n\r\n### Bug Fixes\r\n\r\n- Fix an `AttributeError` crash on shutdown when tracking a script that calls `gevent.monkey.patch_all()` (or otherwise replaces `threading.Thread` while tracking). The `Tracker` now records the `threading.Thread` subclass it patched on entry and removes its instrumentation from that same class on exit, instead of looking up `threading.Thread` again. (#856)\r\n- Deduplicate rows in the table reporter that had identical displayed fields but different underlying call stacks. Also add a `--split-threads` option to the table reporter, matching the flamegraph reporter's existing option, and change the table reporter to no longer split allocations by thread by default. (#857)\r\n- Fix the `%%memray_flamegraph` [Jupyter integration](https://bloomberg.github.io/memray/jupyter_magic.html) to correctly embed a flame graph for Python 3.12 and higher. Previously it was giving a 404 error due to `tempfile.mkdtemp` changing to return absolute paths. (#896)\r\n- Fix integration with the `greenlet` package when greenlet 3.4.0 is installed and when tracing is started before the greenlet module is imported. (#908)\r\n- Fix a bug that crashed target processes when `memray attach` failed to `dlopen` our library. The underlying permissions issue is now accounted for and a troubleshooting message prints when it arises. (#940)\r\n- Fix a potential deadlock in the gdb backend for `memray attach`. (#966)\r\n- Fix the `%%memray_flamegraph` [Jupyter integration](https://bloomberg.github.io/memray/jupyter_magic.html) to correctly embed a flame graph when used with IPython 9.16.0 (a regression in that version broke our integration; it was fixed in IPython 9.16.1). (#981)","is_prerelease":false},"readme":true,"readme_zh":false,"news":[],"stale":false,"snapshot_at":"2026-11-16T09:23:14Z","history_start":"2026-09-06"}