frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Detect memory leaks of C extensions with psutil and psleak

https://gmpy.dev/blog/2025/psutil-heap-introspection-apis
22•grodola•2d ago

Comments

grodola•2d ago
I have released new psutil 7.2.0, which includes 2 new APIs to inspect C heap memory allocations.

I have also released a new tool called psleak, which detects memory leaks in C extension modules.

https://gmpy.dev/blog/2025/psutil-heap-introspection-apis

https://github.com/giampaolo/psleak/

parados•49m ago
Hey, thank you so much for all your hard work on psutil, it is my goto import! And this looks like a really interesting development you have created to add to the available tools for detecting those tricky memory leaks.

I have done some work in this space as well such as how to write a Python C extension without leaks in the first place [0]. This also contains a section on memory leaks, using tools like your psutil [1] This also shows where the Python documentation for C extensions contains errors, omissions or is misleading. These errors can trap the unwary.

Also I developed a Python memory tracer, pymemtrace, that uses a variety of techniques (including using your psutil!) to track memory usage at different costs and levels of granularity [2].

Now psutil 7.2.0 is out I'll update both those projects.

Thanks again for all your hard work.

[0] Project: https://github.com/paulross/PythonExtensionPatterns Docs: https://pythonextensionpatterns.readthedocs.io/en/latest/ind...

[1] https://pythonextensionpatterns.readthedocs.io/en/latest/mem...

[2] Project: https://github.com/paulross/pymemtrace Docs: https://pymemtrace.readthedocs.io/

ofek•26m ago
This is awesome, thanks a lot! I'm going to introduce this in the test suites of the extension modules I maintain [0][1] and, if all goes well, eventually at work [2].

I really appreciate the support for Windows as that platform is currently underserved [3] when it comes to such memory tooling.

[0]: https://github.com/jcrist/msgspec

[1]: https://github.com/ofek/coincurve

[2]: https://github.com/DataDog/integrations-core

[3]: https://github.com/bloomberg/memray

Apple releases open-source model that instantly turns 2D photos into 3D views

https://github.com/apple/ml-sharp
131•SG-•2h ago•42 comments

Show HN: Ez FFmpeg – Video editing in plain English

http://npmjs.com/package/ezff
223•josharsh•7h ago•93 comments

Splice a Fibre

https://react-networks-lib.rackout.net/fibre
45•matt-p•3h ago•17 comments

How uv got so fast

https://nesbitt.io/2025/12/26/how-uv-got-so-fast.html
1061•zdw•22h ago•360 comments

Show HN: Mysti – Claude, Codex, and Gemini debate your code, then synthesize

https://github.com/DeepMyst/Mysti
73•bahaAbunojaim•4d ago•74 comments

Intertapes – collection of found cassette tapes from different locations

https://intertapes.net/
48•wallflower•6d ago•6 comments

Mruby: Ruby for Embedded Systems

https://github.com/mruby/mruby
82•nateb2022•5d ago•23 comments

Ask HN: Resources to get better at outbound sales?

14•sieep•5d ago•6 comments

Detect memory leaks of C extensions with psutil and psleak

https://gmpy.dev/blog/2025/psutil-heap-introspection-apis
22•grodola•2d ago•3 comments

Faster practical modular inversion

https://purplesyringa.moe/blog/faster-practical-modular-inversion/
25•todsacerdoti•6d ago•3 comments

Exe.dev

https://exe.dev/
327•achairapart•16h ago•181 comments

Some Junk Theorems in Lean

https://github.com/James-Hanson/junk-theorems-in-lean
55•saithound•4d ago•37 comments

Always bet on text (2014)

https://graydon2.dreamwidth.org/193447.html
290•jesseduffield•16h ago•138 comments

The best things and stuff of 2025

https://blog.fogus.me/2025/12/23/the-best-things-and-stuff-of-2025.html
322•adityaathalye•4d ago•41 comments

QNX Self-Hosted Developer Desktop

https://devblog.qnx.com/qnx-self-hosted-developer-desktop-initial-release/
212•transpute•14h ago•116 comments

Langjam-Gamejam Devlog: Making a language, compiler, VM and 5 games in 52 hours

https://github.com/Syn-Nine/gar-lang/blob/main/DEVLOG.md
76•suioir•5d ago•7 comments

An exploration of playing three generations of windows games on macOS

https://carette.xyz/posts/deep_dive_into_crossover/
12•LucidLynx•1w ago•4 comments

Package managers keep using Git as a database, it never works out

https://nesbitt.io/2025/12/24/package-managers-keep-using-git-as-a-database.html
696•birdculture•1d ago•387 comments

Publishing your work increases your luck

https://github.com/readme/guides/publishing-your-work
194•magoghm•15h ago•67 comments

More dynamic cronjobs

https://george.mand.is/2025/09/more-dynamic-cronjobs/
68•0928374082•9h ago•17 comments

Verdichtung

https://alexeygy.github.io/blog/verdichtung/
18•kenty•7h ago•6 comments

Experts explore new mushroom which causes fairytale-like hallucinations

https://nhmu.utah.edu/articles/experts-explore-new-mushroom-which-causes-fairytale-hallucinations
432•astronads•22h ago•256 comments

OrangePi 6 Plus Review: The New Frontier for ARM64 SBC Performance

https://boilingsteam.com/orange-pi-6-plus-review/
29•ekianjo•2h ago•24 comments

One million (small web) screenshots

https://nry.me/posts/2025-10-09/small-web-screenshots/
128•squidhunter•5d ago•17 comments

Show HN: Witr – Explain why a process is running on your Linux system

https://github.com/pranshuparmar/witr
395•pranshuparmar•1d ago•80 comments

Floor796

https://floor796.com/
7•krtkush•2h ago•0 comments

Inside the proton, the ‘most complicated thing you could possibly imagine’ (2022)

https://www.quantamagazine.org/inside-the-proton-the-most-complicated-thing-imaginable-20221019/
87•tzury•12h ago•22 comments

How Lewis Carroll computed determinants (2023)

https://www.johndcook.com/blog/2023/07/10/lewis-carroll-determinants/
194•tzury•20h ago•52 comments

Researchers develop a camera that can focus on different distances at once

https://engineering.cmu.edu/news-events/news/2025/12/19-perfect-shot.html
68•gnabgib•3d ago•30 comments

AI Police Reports: Year in Review

https://www.eff.org/deeplinks/2025/12/ai-police-reports-year-review
176•hn_acker•3d ago•147 comments